PrimeHub Python SDK
Project description
PrimeHub Python SDK
PrimeHub Python SDK is the PrimeHub AI Platform Software Development Kit (SDK) for Python, which allows Python developers to write software that makes use of services like Job and Deployment.
Getting Started
Assuming that you have Python, you can install the library using pip:
$ pip install primehub-python-sdk
Or trying the latest from our source code:
$ pip install git+https://github.com/InfuseAI/primehub-python-sdk.git@main
Using CLI
After installing PrimeHub Python SDK
Next, set up the configuration in ~/.primehub/config.json
:
{
"api-token": "<api-token>",
"endpoint": "https://<primehub-domain>/api/graphql",
"group": {
"name": "<group-name>"
}
}
The <api-token>
could be generated from User Portal.
Then, from a shell:
$ primehub me
id: a7db12dc-04fa-419c-9cd7-af768575a871
username: phadmin
firstName: None
lastName: None
email: dev+phadmin@infuseai.io
isAdmin: True
Running primehub
without arguments to show help:
$ primehub
Usage:
primehub <command>
Available Commands:
config Update the settings of PrimeHub SDK
datasets Get a dataset or list datasets
deployments Get a deployment or list deployments
files List and download shared files
groups Get a group or list groups
images Get a image or list images
info Display the user information and the selected group information
instancetypes Get an instance types of list instance types
jobs Get a job or list jobs
me Show user account
notebooks Get notebooks logs
schedules Get a schedule or list schedules
version Display the version of PrimeHub Python SDK
Options:
-h, --help Show the help
Global Options:
--config CONFIG Change the path of the config file (Default: ~/.primehub/config.json)
--endpoint ENDPOINT Override the GraphQL API endpoint
--token TOKEN Override the API Token
--group GROUP Override the current group
--json Output the json format (output human-friendly format by default)
SDK
from a Python interpreter:
In [1]: from primehub import PrimeHub, PrimeHubConfig
In [2]: ph = PrimeHub(PrimeHubConfig())
In [3]: ph.me.me()
Out[3]:
{'id': 'a7db12dc-04fa-419c-9cd7-af768575a871',
'username': 'phadmin',
'firstName': None,
'lastName': None,
'email': 'dev+phadmin@infuseai.io',
'isAdmin': True}
In [4]:
Docs
There is a docs folder in our repository. You could find:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file primehub-python-sdk-0.3.6.tar.gz
.
File metadata
- Download URL: primehub-python-sdk-0.3.6.tar.gz
- Upload date:
- Size: 60.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f7329d1160b5d7571e68cd75b4a9504cffee81a0203dee5ad9b44ea329ec222 |
|
MD5 | 900efd2cd7158fea6fe770786ca3cb7c |
|
BLAKE2b-256 | c50384bbd8062879b153e2bf7346a9a77e1e3f382cf35ea562e2323e733d99ec |
File details
Details for the file primehub_python_sdk-0.3.6-py3-none-any.whl
.
File metadata
- Download URL: primehub_python_sdk-0.3.6-py3-none-any.whl
- Upload date:
- Size: 85.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c42e4ac4af82799d1d3262db7d1b05e400b79b719757cced1ad73c0f8da330e |
|
MD5 | 80f1a09a71460e809861c3f60b67efa9 |
|
BLAKE2b-256 | 1f16cd488a6052636a11a629deb34168b3b503442de9e40070fd77c566f5dba8 |