Registry / data / label-studio-tools

label-studio-tools

JSON →
library0.0.4pypypiunverified

Common tools for Label Studio, including data loading, config parsing, and video keyframe extraction. Current version is 0.0.4, requires Python >=3.6, and is maintained by HumanSignal (formerly Heartex). Releases are infrequent.

pip install label-studio-tools
INSTALL
IMPORT
SIG · LABEL-STUDIO-TOOLS
L
label-studio-tools
datapythonv0.0.4
Install
2.0s avg
Import
Disk
28MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 30MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.0s · import 0.000s · 30MB
28MB installed
● package 28MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_local_path
from label_studio_tools.core.utils.io import get_local_path
from label_studio_tools.core.utils.io import get_local_path

Parse a config XML and get local path for a file. For storage downloads, set LS_API_KEY environment variable and provide a task_id.

from label_studio_tools.core.utils.io import get_local_path from label_studio_tools.core.utils.config import parse_config # Parse a Label Studio config XML string config_xml = """<View><Text name="text" value="$text"/><Choices name="label" toName="text"><Choice value="A"/><Choice value="B"/></Choices></View>""" parsed = parse_config(config_xml) print(parsed) # Get local path for a task's data (requires LS_API_KEY env var for non-local storage) import os os.environ['LS_API_KEY'] = os.environ.get('LS_API_KEY', '') # task_id is needed for storage downloads; for local files, just provide the path try: path = get_local_path('/path/to/data', task_id=123) print(path) except Exception as e: print(e)
Debug
Known issues
breakingIn version 0.0.4, get_local_path now requires LS_API_KEY and a valid task_id to download files from cloud storage. If you omit these, it may fall back to local path or raise an error. Breaking change from earlier versions that did not support cloud storage.
fix
Set LS_API_KEY environment variable and pass a valid task_id to get_local_path to use cloud storage. For local files, ensure the path is a local file.
affects: >=0.0.4
gotchaThe package structure changed between 0.0.1 and 0.0.2. Import paths include 'core' (e.g., label_studio_tools.core.utils.io). Attempting flat imports (label_studio_tools.utils.io) will fail.
fix
Use imports with 'core' module: from label_studio_tools.core.utils.io import get_local_path
affects: >=0.0.2
gotchaparse_config returns a dictionary; not a string or an object with methods. Do not call it expecting a string representation.
fix
Ensure you treat the output as a dict for further processing.
affects: all
Upgrade
Version history
0.0.4latest on PyPI · released Apr 29, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
10
Amazon
1
Resources
label-studio-tools — pip install label-studio-tools · libregistry