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