For the complete documentation index, see llms.txt. This page is also available as Markdown.

Data Units

List and retrieve loose datasource or grouped project work units with stable filters.

Outcome: List and retrieve loose datasource or grouped project work units with stable filters.

units = project.data_units(
    search="study-001",
    data_type="medical",
    status="annotate",
    kind="group",
)

unit = client.get_data_unit(project.id, units[0].id)
print(unit.kind, unit.items)

A loose file is a datasource Data Unit. A Data Group is a group Data Unit whose items contain member tile summaries; members are not duplicated in the top-level list. Available filters are search, data_type, status, batch_queue, and kind.

Use Data Unit IDs for task-scoped automation and retain group membership when downstream work depends on context.

Operating contract

Concern
Required behavior

Execution surface

Pinned unitlab==3.0.0 application environment on Python 3.10+.

Identity

Least-privilege API key supplied through approved configuration.

Target resolution

Stable resource IDs and an explicitly bounded target set.

Success evidence

Typed return fields, server-side state, and downstream acceptance of the result.

Failure and recovery boundary

Condition
Response

Authentication or authorization fails

Stop, correct the service identity or access model, rotate exposed credentials, and rerun a read-only check.

Validation or entitlement rejects the operation

Correct the input or entitlement; do not retry an unchanged request.

A request times out

Inspect remote state before repeating a mutation because the server may have accepted it.

Asynchronous processing exceeds its deadline

Preserve the Batch Queue or release ID, continue bounded monitoring, and inspect item-level failures.

Only part of a batch succeeds

Keep successful identifiers, isolate failed rows, and retry only the corrected subset.


Continue with Unitlab: multimodal data curation