Properties
Property definitions and computed values.
nimbusimage.properties.PropertyAccessor
Access property definitions and values for a dataset.
list()
List all property definitions accessible to the user.
get(property_id)
Get a property definition by ID.
create(name, shape='polygon', tags=None, image='properties/none:latest', worker_interface=None)
Create a new property definition.
get_or_create(name, shape='polygon', **kwargs)
Get existing property by name+shape, or create it.
register(property_id)
Add property to all collections for this dataset.
Fetches each unique collection, appends property_id if not present, and saves. Deduplicates by collection ID so shared collections are only updated once.
delete(property_id)
Delete a property definition.
get_values(annotation_id=None)
Get property values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
annotation_id
|
str | None
|
If provided, get values for this annotation only. Otherwise, get all values for the dataset. |
None
|
submit_values(property_id, values)
Submit property values in bulk.
Transforms user-friendly format to backend wire format and auto-batches at 10K entries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
property_id
|
str
|
The property these values belong to. |
required |
values
|
dict[str, dict]
|
Dict mapping annotation_id to {key: value} dicts. Example: {"ann_1": {"Area": 100}, "ann_2": {"Area": 200}} |
required |
delete_values(property_id)
Delete all values for a property in this dataset.
histogram(property_path, buckets=255)
Get histogram for a property across all annotations.
compute(property, worker_interface=None, scales=None)
Run a property worker to compute values.
Submits a Docker worker job via
POST /annotation_property/{id}/compute. The worker container
receives the property definition and scales as JSON parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
property
|
Property
|
The Property definition. Must have a non-empty
|
required |
worker_interface
|
dict | None
|
Parameter values matching the worker's
interface schema (from |
None
|
scales
|
dict | None
|
Scale metadata (pixel size, etc.). Passed through to the worker for unit-aware computations. |
None
|
Returns:
| Type | Description |
|---|---|
Job
|
A Job object. Call |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the property has no |