Skip to main content

Official Python SDK for LabelSets — dataset scoring, LQS v3.1 cert verification, marketplace client

Project description

LabelSets Python SDK

The official Python client for the LabelSets AI training data marketplace.

pip install labelsets

Quick start

import labelsets

# Authenticate with your API key (get one at labelsets.ai/dashboard-seller.html)
labelsets.login("ls_your_api_key_here")

# Search the catalog
results = labelsets.search(
    "urban driving pedestrians rain",
    format="yolo",
    min_items=5000,
    max_price=500,
)
print(f"Found {len(results)} datasets")

# Inspect results
for ds in results:
    print(f"  {ds.title}: ${ds.price:.0f} ({ds.item_count:,} items, quality={ds.quality_score:.0%})")

# Get a specific dataset
ds = results[0]
print(ds.format, ds.license_type, ds.compliance)

# Download (must be purchased first at labelsets.ai)
path = ds.download("./training-data/")

# Natural language search (Pro plan)
results = labelsets.search(
    "HIPAA-compliant chest X-ray datasets with radiologist labels, at least 5000 images",
    natural_language=True,
)

# Convert results to pandas DataFrame
df = results.to_dataframe()
df[["title", "price", "quality_score"]].sort_values("quality_score", ascending=False)

Environment variable auth

export LABELSETS_API_KEY="ls_your_key_here"
import labelsets
# No login() call needed when env var is set
results = labelsets.search("medical imaging")

Stream without downloading

ds = labelsets.get("dataset-id")
for batch in ds.stream(batch_size=64):
    images = [item["image_url"] for item in batch]
    labels = [item["annotations"] for item in batch]
    model.train_step(images, labels)

HuggingFace integration

# Export to HuggingFace Hub
ds = labelsets.get("dataset-id")
url = ds.to_huggingface("yourname/my-dataset")
print(f"Published at {url}")

# Import from HuggingFace
import labelsets
meta = labelsets.get_client()._get("/api/hf/import", {"repo_id": "roboflow/coco-128"})

Organizations (Team plan)

# All purchases under your org are shared with team members
# Manage at labelsets.ai/org.html

Installation options

# Basic (search, download)
pip install labelsets

# With PyTorch helpers
pip install "labelsets[torch]"

# With HuggingFace integration
pip install "labelsets[hf]"

# Everything
pip install "labelsets[all]"

API reference

Function Description
labelsets.login(key) Authenticate
labelsets.search(query, **filters) Search catalog
labelsets.get(id) Fetch one dataset
labelsets.list_datasets() List all published datasets
labelsets.bundles() List curated bundles
dataset.download(dest) Download purchased dataset
dataset.stream(batch_size) Stream samples
dataset.to_huggingface(repo_id) Push to HF Hub
results.to_dataframe() Convert to pandas DataFrame
results.filter(max_price=100) Client-side filter

Links

Project details


Download files

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

Source Distribution

labelsets-0.3.0.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

labelsets-0.3.0-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file labelsets-0.3.0.tar.gz.

File metadata

  • Download URL: labelsets-0.3.0.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for labelsets-0.3.0.tar.gz
Algorithm Hash digest
SHA256 541f8cf4ecc961ed1051e4dbb4b189ce66ca8e4a395819ee86863c78f70a5dac
MD5 d8258688691ed5c15eab1e91424e2c66
BLAKE2b-256 f7d171115c255423eb67bc84b90e9a16c2afe79456161498c3f48417e0a75c40

See more details on using hashes here.

File details

Details for the file labelsets-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: labelsets-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for labelsets-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6f600eecf14753a9f6cef29e80192ac2c1654db75424011fc97ca53983010f7
MD5 f39cbbd1f9b70783be8f00aafc4ac836
BLAKE2b-256 f45b40967fd080cd6995c9ab7e9911cd3994e65ce20e4b48ad87468f774f0527

See more details on using hashes here.

Supported by

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