Skip to content

johnseq-iterative/cord-client-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cord Python API Client

Cord logo

license

Where the world creates and manages training data

💻 Features

  • Minimal low-level Python client that allows you to interact with Cord's API
  • Supports Python: 3.6, 3.7, and 3.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("<resource_id>", "<resource_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("<resource_id>", "<resource_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.

About

Cord Python API Client

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages