| Workflow | Status |
|---|---|
| Continuous Integration (CI) | |
| Publish to PYPI |
The RelationalAI (RAI) SDK for Python enables developers to access the RAI REST APIs from Python.
- You can find RelationalAI Python SDK documentation at https://docs.relational.ai/rkgms/sdk/python-sdk
- You can find RelationalAI product documentation at https://docs.relational.ai
- You can learn more about RelationalAI at https://relational.ai
- Python 3.7+
Install using pip:
$ [sudo] pip install rai-sdk
Install from source using pip:
$ git clone git@github.com:RelationalAI/rai-sdk-python.git
$ cd rai-sdk-python
$ [sudo] python3 setup.py installInstall from source in editable mode.
$ git clone git@github.com:RelationalAI/rai-sdk-python.git
$ cd rai-sdk-python
$ [sudo] pip install -r requirements.txt
$ [sudo] pip install -e .In order to run the examples and, you will need to create an SDK config file.
The default location for the file is $HOME/.rai/config and the file should
include the following:
Sample configuration using OAuth client credentials:
[default]
host = azure.relationalai.com
client_id = <your client_id>
client_secret = <your client secret>
# the following are all optional, with default values shown
# port = 443
# scheme = https
# client_credentials_url = https://login.relationalai.com/oauth/token
Client credentials can be created using the RAI console at https://console.relationalai.com/login
Sample configuration using API access key credentials (deprecated):
[default]
host = azure.relationalai.com
port = <api-port> # optional, default: 443
scheme = <scheme> # optional, default: https
access_key = <your public access key>
private_key_filname = <name of file containing private key>
Note, the SDK expects to find the private key file in the same folder as the config file.
You can copy config.spec from the root of this repo and modify as needed.
python -m grpc_tools.protoc -I railib/pb --python_out=./railib/pb railib/pb/*.protoEach of the example files in the ./examples folder is standalone and can be
run from the command line, eg:
$ cd examples
$ python3 ./list_engines.pyYou can reach the RAI developer support team at support@relational.ai
We value feedback and contributions from our developer community. Feel free to submit an issue or a PR here.
The RelationalAI Software Development Kit for Python is licensed under the Apache License 2.0. See: https://github.com/RelationalAI/rai-sdk-python/blob/master/LICENSE