Assets, Spaces & Zones
Assets
Returns all assets for the project. Optionally filter by a list of asset IDs.
assets(asset_ids=None)Arguments
| Argument | Default | Description |
|---|---|---|
asset_ids |
None |
Optional list of asset ID strings to filter |
Returns
AssetList with the following attributes per
Asset:
| Attribute | Type | Description |
|---|---|---|
id |
str |
Asset ID |
name |
str |
Asset name |
type |
str |
Asset type |
props |
dict |
Optional properties |
ontology |
Ontology |
Optional ontology classification |
source_ids |
list[str] |
Associated source IDs |
Example
# all assets
for asset in client.assets():
print(asset.id, asset.name, asset.type)
# filter by ID
assets = client.assets(asset_ids=["a.1", "a.2"])
asset = assets.asset("a.1")
print(asset.name)Spaces
Returns all spaces for the project. Optionally filter by a list of space IDs.
spaces(space_ids=None)Arguments
| Argument | Default | Description |
|---|---|---|
space_ids |
None |
Optional list of space ID strings to filter |
Returns
SpaceList with the following attributes per
Space:
| Attribute | Type | Description |
|---|---|---|
id |
str |
Space ID |
name |
str |
Space name |
type |
str |
Space type |
parent_space_id |
str |
Parent space ID if nested |
parent_zone_id |
str |
Parent zone ID if applicable |
contains_asset_ids |
list[str] |
Asset IDs contained in this space |
props |
dict |
Optional properties |
ontology |
Ontology |
Optional ontology classification |
Example
# all spaces
for space in client.spaces():
print(space.id, space.name)
# lookup by ID
space = client.spaces().space("sp.3")
print(space.name)Zones
Returns all zones for the project. Optionally filter by a list of zone IDs.
zones(zone_ids=None)Arguments
| Argument | Default | Description |
|---|---|---|
zone_ids |
None |
Optional list of zone ID strings to filter |
Returns
ZoneList with the following attributes per
Zone:
| Attribute | Type | Description |
|---|---|---|
id |
str |
Zone ID |
name |
str |
Zone name |
type |
str |
Zone type |
fed_by_asset_ids |
list[str] |
Assets that feed this zone |
feeds_space_ids |
list[str] |
Spaces fed by this zone |
ontology |
Ontology |
Optional ontology classification |
Example
# all zones
for zone in client.zones():
print(zone.id, zone.name)
# lookup by ID
zone = client.zones().zone("z.2")
print(zone.name)