Labelbox Python API
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file labelbox-7.5.0.tar.gz.
File metadata
- Download URL: labelbox-7.5.0.tar.gz
- Upload date:
- Size: 5.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46cb5a49b76770b043fd9cb9dad3fd8c1c0110c0d4db7479cb0a31f6713234c1
|
|
| MD5 |
ca1617cfc9293ac15a1e23dbd993543f
|
|
| BLAKE2b-256 |
1c6d807652db57aef3b35c85a182cb1ff5bc1bea99f7fa5e046b6a1e62dc1b3e
|
Provenance
The following attestation bundles were made for labelbox-7.5.0.tar.gz:
Publisher:
publish.yml on Labelbox/labelbox-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
labelbox-7.5.0.tar.gz -
Subject digest:
46cb5a49b76770b043fd9cb9dad3fd8c1c0110c0d4db7479cb0a31f6713234c1 - Sigstore transparency entry: 877430729
- Sigstore integration time:
-
Permalink:
Labelbox/labelbox-python@b1b5f7c8a0bd8271775cc9fe1ae670a49c8e208f -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/Labelbox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b1b5f7c8a0bd8271775cc9fe1ae670a49c8e208f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file labelbox-7.5.0-py3-none-any.whl.
File metadata
- Download URL: labelbox-7.5.0-py3-none-any.whl
- Upload date:
- Size: 317.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da6f4faeda9b11a33c89d4ca8ffca24a23b195cdf1a800eba6e86a70b4d239c
|
|
| MD5 |
9d683ef57af984031611f3c749fba5ec
|
|
| BLAKE2b-256 |
de1b0add5d51936efc627aed50e503ea91372b029332bbadbb39a3dc80087b99
|
Provenance
The following attestation bundles were made for labelbox-7.5.0-py3-none-any.whl:
Publisher:
publish.yml on Labelbox/labelbox-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
labelbox-7.5.0-py3-none-any.whl -
Subject digest:
3da6f4faeda9b11a33c89d4ca8ffca24a23b195cdf1a800eba6e86a70b4d239c - Sigstore transparency entry: 877430747
- Sigstore integration time:
-
Permalink:
Labelbox/labelbox-python@b1b5f7c8a0bd8271775cc9fe1ae670a49c8e208f -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/Labelbox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b1b5f7c8a0bd8271775cc9fe1ae670a49c8e208f -
Trigger Event:
workflow_dispatch
-
Statement type: