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

Return types and raw payloads

Use typed dataclasses for stable fields and raw payloads for diagnosis or forward-compatible access.

Outcome: Use typed dataclasses for stable fields and raw payloads for diagnosis or forward-compatible access.

Public results include ProcessingStatus, AssetUploadResult, AttachPreview, AttachResult, CloudEntry, resource handles, and resource-specific dataclasses. Stable fields use public product terminology such as image rather than backend abbreviations.

result = project.attach(dataset_ids=["DATASET_ID"])
print(result.created_count)
print(result.already_attached_count)
print(result.data_group_ids)
print(result.raw)  # diagnostic/forward-compatible payload

Do not build critical business logic against undocumented keys in raw. Prefer typed fields and pin the SDK version when a raw field is unavoidable.

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.


Explore related Unitlab capabilities: AI training-data annotation