python sdk for Instill AI products
Project description
Overview
python sdk for Instill AI products
[!IMPORTANT]
This SDK tool is under heavy development!!
Currently there has yet to be a stable version release, please feel free to open any issue regarding this SDK in our community repo
Setup
Requirements
- Python 3.8+
Installation
[!WARNING]
If your host machine is on arm64 architecture(including Apple silicon machines, equipped with m1/m2 processors), there are some issues when installinggrpcio
withinconda
environment. You will have to manually build and install it like below. Read more about this issue here.
$ GRPC_PYTHON_LDFLAGS=" -framework CoreFoundation" pip install grpcio --no-binary :all:
Install it directly into an activated virtual environment:
$ pip install instill-sdk
or add it to your Poetry project:
$ poetry add instill-sdk
Check import
After installation, you can check if it has been installed correctly:
$ python
>>> import instill
>>> instill.__version__
Config Instill Core
or Instill Cloud
instance
Before we can start using this SDK, you will need to create and fill the host related configs, currently the config file path is ${HOME}/.config/instill/config.yaml
[!NOTE]
For each instance you are going to config, you will have to obtain anapi_token
, by going to Settings > API Tokens page from the console, no matter it isInstill Core
orInstill Cloud
.
Within the config file, you can define multiple instances with the alias
of your liking, later in the SDK you can refer to this alias
to switch between the instance.
hosts:
alias1:
url: str
secure: bool
token: str
alias2:
url: str
secure: bool
token: str
...
...
[!NOTE]
You will want to have exactly one instance nameddefault
. The SDK will attempt to connect to this instance initially, and later on you can swtich to other instances you specified in the config.
Example:
hosts:
default:
url: localhost:8080
secure: false
token: instill_sk***
cloud:
url: api.instill.tech
secure: true
token: instill_sk***
Usage
Comming soon
You can find a notebook example here
Contributing
Please refer to the Contributing Guidelines for more details.
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
Hashes for instill_sdk-0.1.0rc2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bd498c192e5fe3e7198a7ed6ce707e52b687f4efe1828fd34945887d6aa292d |
|
MD5 | 3312d689c8365093922028359b850baf |
|
BLAKE2b-256 | 04856d050140c6233a02eb13b5917953b60ab4a039ae0734ad7b725539ffef34 |