Cord Python API Client
The data programming platform for AI
💻
Features
- Minimal low-level Python client that allows you to interact with Cord's API
- Supports Python:
3.6
,3.7
, and3.8
✨
Relevant Links
💡
Getting Started
For full documentation, visit Cord Python API Client.
First, install Cord Python API Client using the pip package manager:
pip install cord-client-python
Then, create an API key for authentication via the Cord web app. Pass the project ID and API key as environment variables or pass them explicitly when you initialise the CordClient object.
export CORD_PROJECT_ID="<project_id>"
export CORD_API_KEY="<project_api_key>"
Passing the project ID and API key as environment variables, you can initialise the Cord client directly.
from cord.client import CordClient
client = CordClient.initialise()
If you want to avoid setting environment variables, you can initialise the Cord client by passing the project ID and API key as strings.
from cord.client import CordClient
client = CordClient.initialise("<project_id>", "<project_api_key>")
If you wish to instantiate several client objects and avoid passing parameters each time, you can instantiate a CordConfig object, pass the project ID and API key as strings, and initialise the client with the config object.
from cord.client import CordClient
from cord.client import CordConfig
config = CordConfig("<project_id>", "<project_api_key>")
client = CordClient.initialise_with_config(config)
Once you have instantiated a Cord client, it is easy to fetch information associated with the given project ID.
from cord.client import CordClient
client = CordClient.initialise()
project = client.get_project()
🐛
Troubleshooting
Please report bugs to GitHub Issues. Just make sure you read the Cord documentation and search for related issues first.