Skip to content

client.visualization

Bases: SyncResource

Sync visualization namespace (client.visualization).

annotations

annotations(dataset_id: UUID | str, asset_id: UUID | str, *, sources: list[SourceRefParam]) -> MultiSourceAnnotations

One asset's annotations, grouped per requested source, for overlaying.

Parameters:

Name Type Description Default
sources list[SourceRefParam]

non-empty list of {"project_id": ..., "version_id": ...} dicts. version_id is None for live state or a version UUID for that version's frozen snapshot. JSON-encoded into the server's single sources query param (see the module gotchas).

required

Raises:

Type Description
BadRequestError

sources is not a non-empty JSON array (BAD_REQUEST).

UnprocessableError

a malformed source entry (bad/extra key, non-UUID id).

NotFoundError

a project isn't in this dataset (PROJECT_NOT_FOUND) or a referenced version doesn't exist (VERSION_NOT_FOUND).

ForbiddenError

caller is not a member of a referenced project (AUTH_FORBIDDEN).

ConflictError

a referenced version is not ready yet, or predates the current manifest schema (RESOURCE_NOT_READY).

Response models

Models returned by client.visualization methods (fields, types, and what each means).

Multi-source annotation-visualization models (project_workflow route).

Bundles one asset's annotations from several sources (live project state and/or frozen versions) into one payload for a viewer to overlay. See resources.visualization.Visualization.annotations.

AnnotationsBySource

Bases: BaseModel

One source's annotations for the asset. version_id is null for the live current state, or a version UUID for that version's frozen S3 manifest.

shapes and annotations are the SAME list (annotations is a legacy alias the server still emits; prefer shapes). Each entry is a raw annotation dict, deliberately left untyped: the annotation read model is owned by the annotations domain, and this visualization-prep endpoint is a pass-through — keys mirror the annotation-read contract (id, class_id, type, geometry, data, source, ...).

MultiSourceAnnotations

Bases: BaseModel

One asset's annotations, grouped per requested source.