Requirements
-
Make sure
pip
is installed and up-to-date. - Use the Workspace settings menu of the Labelbox app to create an API key. Store your key in a safe place, as you cannot view it after it has been created.
- Python: 3.9 - 3.13
Install or upgrade SDK
After you create an API key, you can start using our Python SDK. To install, run eitherpip install labelbox
orpip install "labelbox[data]"
in your command line.
Module | Description |
---|---|
"labelbox[data]" | Installs all required dependencies (libraries, tools to manipulate annotations, and more.) |
labelbox | Installs all required libraries for client-only functionality |
pip install --upgrade labelbox
To run the Python SDK in a Docker container, use the included Dockerfile as a starting place.
Related info:
- The Python SDK Github repository
- The most recent update to the Python SDK can be found at:
https://github.com/Labelbox/labelbox-python/releases/latest/
- Changelog of recent changes.
Authentication
You need an API key to authenticate your client. You can:-
Save your key to an environment variable:
Then, import and initialize the API Client.
-
Paste your API key directly into your script (not recommended)