Skip to main content

Labelbox Python API

Project description

Labelbox Python SDK

Release Notes CI Downloads Dependency Status Open Issues Changelog License: Apache 2.0 Twitter Follow LinkedIn Follow Supported Python Versions

Labelbox is focused on building a data-centric AI platform for enterprises to develop, optimize, and use AI to solve problems and power new products and services.

Enterprises use Labelbox to curate data, generate high-quality human feedback data for computer vision and LLMs, evaluate model performance, and automate tasks by combining AI and human-centric workflows. The academic & research community uses Labelbox for cutting-edge AI research.

Visit Labelbox for more information.

Table of Contents

Quick Start

Sign Up

If you haven't already, create a free account at Labelbox.

Generate an API key

Log into Labelbox and navigate to Account > API Keys to generate an API key.

Install

To install the SDK, run the following command.

pip install labelbox

If you'd like to install the SDK with enhanced functionality, which additional optional capabilities surrounding data processing, run the following command.

pip install "labelbox[data]"

If you want to installed a version of Labelbox built locally, be aware that only tagged commits have been validated to fully work! Installing the latest from develop is at your own risk!

Validate Installation and API Key

After installing the SDK and getting an API Key, it's time to validate them both.

import labelbox as lb

client = lb.Client(API_KEY) # API_KEY = API Key generated from labelbox.com
dataset = client.create_dataset(name="Test Dataset")
data_rows = [{"row_data": "My First Data Row", "global_key": "first-data-row"}]
task = dataset.create_data_rows(data_rows)
task.wait_till_done()

You should be set! Running the snippet above should create a dataset called Test Dataset with a single datarow with the text contents being My First Data Row. You can log into Labelbox to verify this. If you have any issues please file a Github Issue or contact Labelbox Support directly. For more advanced examples and information on the SDK, see Documentation below.

Contribution Guidelines

We encourage anyone to contribute to this repository to help improve it. Please refer to Contributing Guide for detailed information on how to contribute. This guide also includes instructions for how to build and run the SDK locally.

Develop with AI assistance

Use the codebase as context for large language models

Using the GPT repository loader, we have created lbx_prompt.txt that contains data from all .py and .md files. The file has about 730k tokens. We recommend using Gemini 1.5 Pro with 1 million context length window.

Documentation

The SDK is well-documented to help developers get started quickly and use the SDK effectively. Here are some resources:

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

labelbox-3.67.0.tar.gz (186.5 kB view details)

Uploaded Source

Built Distribution

labelbox-3.67.0-py3-none-any.whl (238.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: labelbox-3.67.0.tar.gz
  • Upload date:
  • Size: 186.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for labelbox-3.67.0.tar.gz
Algorithm Hash digest
SHA256 d5b985cc1c5ff2c0fb138cb8f74abe6e246540f1a8dc26a4e62d530ba65c4d79
MD5 005d4214fe5e610b18511a191085c599
BLAKE2b-256 93e92ab2274d7648ec9a1529489d8162239579703f133e137e37e865971b4b2a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: labelbox-3.67.0-py3-none-any.whl
  • Upload date:
  • Size: 238.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for labelbox-3.67.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d870075762bff1f787b8bfa2dd8b9a83ecce0c3796702e52aa4df466d61b4d4a
MD5 810e1f5b3b69a75725c32ef65929c50a
BLAKE2b-256 b6200d6100d8b50baa0225bdf79de790f6d56fb30f9931108ceefdabbfe3b7dd

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