New version v2.0.0 of the SDK is available with major improvements and new features. See the Changelog for details and upgrade notes.
Introduction
The Labellerr SDK is a Python library designed to make interaction with the Labellerr platform simple and efficient. With this SDK, you can manage data annotations, projects, and exports seamlessly in your applications. This documentation will guide you through installing the SDK, understanding its core functionalities, and handling common errors.Installation
To install the Labellerr SDK, use the following command:Getting Started
Obtaining API Credentials
To use the Labellerr SDK, you’ll need three credentials:api_key, api_secret, and client_id.
1
Log in to Labellerr
Log in to your Labellerr account at https://login.labellerr.com/
2
Create your Workspace
Create a new workspace or access your existing workspace from the dashboard.
3
Get your API Credentials
Visit your workspace API keys page:From this page, you can obtain all three credentials:
- API Key & Secret: Copy from the API Keys table
- Client ID: Click the Show Client ID button to reveal and copy your client ID
Initialize the Client
Once you have your credentials, import and initialize theLabellerrClient. This client handles all communication with the Labellerr platform.
Understanding the SDK Structure
The Labellerr SDK uses a modular architecture that organizes functionality into specialized modules:labellerr.client- Core client for authentication and API communicationlabellerr.core.datasets- Dataset creation and management operationslabellerr.core.projects- Project creation and management operationslabellerr.core.files- File operations and metadata accesslabellerr.core.schemas- Data validation and configuration modelslabellerr.core.exceptions- Error handling utilities
Example Client Initialization:
Client Initialization
Common Import Patterns
Depending on your use case, you’ll import different modules:Import Examples for Common Tasks
'your-api-key' and 'your-api-secret' with your actual credentials provided by Labellerr.
Working with Cloud Connections
The Labellerr SDK supports seamless integration with cloud storage providers like AWS S3 and Google Cloud Storage (GCS). You can create, test, list, and manage connections programmatically.Creating and Testing Connections
- AWS S3 Connection
- GCS Connection
- List & Manage Connections
S3 Connection with Explicit Path TestingFor AWS S3 connections, you must provide a specific path to test the connection. The SDK will validate access to that exact path in your S3 bucket.
Create and Test S3 Connection
Path Validation:
- The path must be accessible with the provided credentials
- Path format:
s3://bucket-name/folder/subfolder - Test fails if permissions are insufficient or path doesn’t exist
Using Connections with Datasets
Once you’ve created and tested a cloud connection (S3 or GCS), you can use it to create datasets directly from your cloud storage. This allows you to manage large volumes of files without manual uploads, and keeps your data in sync with your existing cloud infrastructure.Create Datasets from Cloud Storage
Learn how to create datasets using your S3 or GCS connections in our dedicated Create Datasets guide, including complete code examples and troubleshooting tips.
Frequently Asked Questions
How do I get my client_id?
How do I get my client_id?
Visit your workspace API keys page at
https://<your-workspace-name>.labellerr.com/workspace/api-keys and click the Show Client ID button to reveal and copy your client ID.Where can I find my API credentials?
Where can I find my API credentials?
You can obtain your
api_key and api_secret by visiting: https://<your-workspace-name>.labellerr.com/workspace/api-keys
