Labelbox
Core mono-module for Labelbox's Python SDK.
Table of Contents
Setup
rye sync --all-features # to install labelbox[data] dependencies
Repository Organization
The SDK source (excluding tests and support tools) is organized into the following packages/modules:
data/package contains code that maps annotations (labels or pre-labels) to Python objects, as well as serialization and deserialization tools for converting between NDJson and Annotation Types.orm/package contains code that supports the general mapping of Labelbox data to Python objects. This includes base classes, attribute (field and relationship) classes, generic GraphQL queries etc.schema/package contains definitions of classes which represent data type (e.g. Project, Label etc.). It relies onorm/classes for easy and succinct object definitions. It also contains custom functionalities and custom GraphQL templates where necessary.client.pycontains theClientclass that's the client-side stub for communicating with Labelbox servers.exceptions.pycontains declarations for all Labelbox errors.pagination.pycontains support for paginated relationship and collection fetching.utils.pycontains utility functions.
Testing
Unit Testing
rye run unit
Integration Testing
LABELBOX_TEST_API_KEY="YOUR_API_TEST_KEY" LABELBOX_TEST_ENVIRON="prod" rye run integration
For more info on how to get a LABELBOX_TEST_API_KEY Labelbox API key docs.
Integration tests by default will run against your account that you provide an API Key from and modify its data. If you want to run integration tests, without it impacting your existing account, create an additional account using a secondary e-mail on Labelbox. Free accounts are sufficent for integration testing purposes.
You can also use a .env file if you prefer instead of needing to type out the environmental overrides every single time you want to run commands. Please add a --env-file parameter to the test command (EG rye --env-file=.env run integration).
(Optional) Data Testing
For testing the impact of the extra installs included with labelbox[data], run the following:
LABELBOX_TEST_API_KEY="YOUR_API_TEST_KEY" LABELBOX_TEST_ENVIRON="prod" rye run data
By default rye sync does not install the extra packages needed in labelbox[data]. You'll need to run rye sync --all-features. Do not checkin requirements.lock or requirements-dev.lock after doing this.
Linting / Formatting
Before making a commit, to automatically adhere to our formatting standards, it is recommended to install and activate pre-commit
pip install pre-commit
pre-commit install
After the above, running git commit ... will attempt to fix formatting,
and make necessary changes to files. You will then need to stage those files again.
You may also manually format your code by running the following:
rye run lint
Documentation
To generate documentation for all modules (ReadTheDocs), run the following command.
rye run docs
Metadata
Release files for labelbox 7.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| labelbox-7.12.0.tar.gz | 5.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| labelbox-7.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.5 MB
Release files / labelbox-7.12.0.tar.gz
| Download URL | labelbox-7.12.0.tar.gz |
|---|---|
| Size | 5.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3d04f750edcbc3674a4b43507b45ae36c66bf55c4375be21f50f45f086b6d0f
|
|
BLAKE2b-256 checksum How to use checksums |
94d8f89c5c5c5f3c87c827043e53f7a229cf47d893507e90fa384646c4bff8d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logRelease files / labelbox-7.12.0-py3-none-any.whl
| Download URL | labelbox-7.12.0-py3-none-any.whl |
|---|---|
| Size | 330.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3feb221ddddf53a4731c0b80f3c06c7f685aa3ba79e9bc98c620cb62c6c0976
|
|
BLAKE2b-256 checksum How to use checksums |
2a54173a0cf56742cafaac55284490d38e1c4ac3939b6778797455bfc5757825
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency log