Label Studio
raw JSON → 1.23.0 verified Mon Apr 27 auth: no python
Label Studio is an open-source data labeling platform for preparing training data for machine learning models. It supports various data types including images, text, audio, video, and time series. The current stable version is 1.23.0, with active development on a nightly build track, releasing approximately monthly.
pip install label-studio Common errors
error ModuleNotFoundError: No module named 'label_studio_sdk' ↓
cause The SDK is not installed alongside the server package.
fix
Run
pip install label-studio-sdk error ImportError: cannot import name 'Client' from 'label_studio' ↓
cause Trying to import from the wrong package.
fix
Use
from label_studio_sdk import Client Warnings
gotcha The label-studio package (server) and label-studio-sdk (client) are separate. Installing label-studio does not automatically install the SDK. Use `pip install label-studio-sdk` for programmatic access. ↓
fix Run `pip install label-studio-sdk` to use the SDK.
deprecated The `start` command with `label-studio start` will eventually be replaced by a CLI command. Check the documentation for the latest startup procedure. ↓
fix Use `label-studio start` as documented, or `python -m label_studio`.
Imports
- LabelStudio
from label_studio_sdk import Client
Quickstart
import os
from label_studio_sdk import Client
# Connect to Label Studio
ls = Client(url='http://localhost:8080', api_key=os.environ.get('LABEL_STUDIO_API_KEY', ''))
# Get or create a project
project = ls.get_project(1) if ls.get_project(1) else ls.create_project(title='My Project')
print(project)
# Import tasks
project.import_tasks([{'data': {'text': 'Hello world'}}])