Installation
Relari cloud API and SDKs are available for both Python and Node.js environments, along with a Command Line Interface (CLI) through the Python package.
Python SDK & CLI
python3 -m pip install relari
To setup the CLI, make sure you define the API key.
Add the following line to your .bashrc
(or .bash_profile
, .zshrc
etc.) file:
RELARI_API_KEY="ek-xxxx"
Optionally you can also set the RELARI_API_URL
to point to a different API endpoint (this should not be necessary in most cases):
RELARI_API_URL="your-api-url"
The Python SDK can pick up RELARI_API_KEY
and RELARI_API_URL
from environment variables, or you can provide these directly when initializing the client:
from relari import Dataset, RelariClient
client = RelariClient(
api_key: "ek-xxxx",
api_url: "https://api.relari.ai/v2/"
)
Node.js SDK
For Node.js environments, Relari provides an NPM package. To install the latest version, use the following command:
npm install relari
To configure the Node.js SDK, you can set the RELARI_API_KEY environment variable similarly:
export RELARI_API_KEY="ek-xxxx"
As with the Python package, you can optionally set the RELARI_API_URL to use a different API endpoint:
export RELARI_API_URL="your-api-url"
You can also provide these when initializing the client:
import { RelariClient } from "relari-sdk"
const client = new RelariClient(
"ek-xxxx",
"https://api.relari.ai/v2/"
)
Obtaining your API key
You can easily obtain this key through our web UI: