Skip to main content

Labelbox Python API

Project description

Labelbox Python API

Labelbox is the training data workbench for ML teams. It allows you to label data with the fastest and most intuitive annotation tools. Visit https://labelbox.com/ for more information.

The Labelbox Python API allows you to interact with Labelbox back-end in a simple, user-friendly way.

Requirements

To use the Labelbox Python API you will need a Labelbox account. Once you login to the Labelbox web page, generate an API key as described in the documentation: https://labelbox.com/docs/api/api-keys. Store the key to a safe location. You will need it for using the Labelbox Python API.

Installation

Labelbox Python API can be installed using Python's Pip manager:

pip install labelbox

Usage

API Key

Your Labelbox API key is required to execute the library. It can be passed to Labelbox Python API via an environment variable LABELBOX_API_KEY. It is then automatically picked up by the Client:

from labelbox import Client
client = Client() # will use the API key from the environment variable

Alternatively you can pass it to the Client object initialization:

from labelbox import Client
client = Client("<your_api_key_here>")

Basic commands

The Labelbox Python API allows you to create, update and delete all standard Labelbox data types, such as Projects, Datasets, DataRows, Labels and others. For more info about the Labelbox data model please visit https://labelbox.com/docs.

Here is an example code for uploading some data from scratch:

from labelbox import Client

client = Client()

# Create a project and a dataset , automatically reflected on the server
project = client.create_project(name="My Great Project")
dataset = client.create_dataset(name="My Dataset")
project.datasets.connect(dataset)

# Upload some files to the dataset
task = dataset.create_data_rows(['file1.jpg', 'file2.jpg'])
# Bulk DataRow creation might take a while on the server-side
task.wait_till_done()

# Your data is now uploaded to Labelbox and ready for labeling!

Documentation and API specification

Documentation for the Labelbox Python Client package can be found at https://labelbox.helpdocs.io/docs/python-client-api. The API documentation is available at https://labelbox.helpdocs.io/docs/python-client-api/api-specification.

Project details


Release history Release notifications | RSS feed

This version

2.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labelbox-2.2.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

labelbox-2.2-py3-none-any.whl (40.4 kB view details)

Uploaded Python 3

File details

Details for the file labelbox-2.2.tar.gz.

File metadata

  • Download URL: labelbox-2.2.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for labelbox-2.2.tar.gz
Algorithm Hash digest
SHA256 a2fdfb0e747747f21e853a1dfdf14d3332129d74e8a6485f81b82cf543908f6c
MD5 27c84da7b2172af21038e0ed50320519
BLAKE2b-256 8c452a1cda392aa96a0f02b17f59b5f23aa033c0b255079d282e386e165cce4a

See more details on using hashes here.

File details

Details for the file labelbox-2.2-py3-none-any.whl.

File metadata

  • Download URL: labelbox-2.2-py3-none-any.whl
  • Upload date:
  • Size: 40.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for labelbox-2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 746e25787e5cc1b80117dc82c479004b450ab538f69cce0b815c4f5927978e0b
MD5 cd1011b1bd09432eb2c698ba7a77fcb8
BLAKE2b-256 ddb840d3064505fc169647c10344aa3059c8e4fa6f6647f66a708476b976c313

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page