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!

Project details


Release history Release notifications | RSS feed

This version

2.0.1

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.0.1.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

labelbox-2.0.1-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: labelbox-2.0.1.tar.gz
  • Upload date:
  • Size: 16.1 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.0.1.tar.gz
Algorithm Hash digest
SHA256 63784e5ebb4193e9d7f2637d9c9cbe08ff7a25325d86e0c21d77cb613cc1ec4c
MD5 39a1257ea924adced5f7a93bd49b9b79
BLAKE2b-256 86e5fdcf27c56ac4de76369d4c810ff50c334dd5731d411d57a618e4d07b37c1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: labelbox-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 23.2 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.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5463c66cadc42deeddca74d87d018f21e41a8e061119b0279bc73891146c978e
MD5 58d64c31d6aa9cd74c7b1f75d034760d
BLAKE2b-256 de25055a35c94a405f3744e36fbc10eaca3deddc93ec88c267223c09b208768a

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