Site
Represents a Site within a project. Inherits project-level asset access methods.
- class roak_sdk.semantics.site.Site(data, registry)[source]
Bases:
ProjectRepresents a Site within a project.
Basically provides all the same functionality as Project, except the possibility to get the sites.
- Parameters:
data (dict)
registry (ClientRegistry)
- get_sites()[source]
Override to prevent hierarchical site nesting.
- Raises:
NotImplementedError – Sites do not support containing child sites.
- get_asset_by_guid(guid)
Fetch a single asset by its GUID.
- Parameters:
guid (str) – GUID of the asset.
- Returns:
The asset object.
- Return type:
Asset
- get_asset_by_name(name, asset_type=None, allow_first_match=False)
Fetch a single asset by name.
- get_assets(asset_type=None)
Fetch all assets in this project, optionally filtered by type.
- get_attributes()
Get the locally cached attribute dictionary.
- Returns:
Raw data dictionary.
- Return type:
- get_borehole_by_guid(guid)
Fetch a borehole by its GUID.
- get_borehole_by_name(name, allow_first_match=False)
Fetch a borehole by its name.
- get_last_values()
Get one last-reading summary row per feed for this semantic.
- Returns rows with:
feedname
last_value
unit (unit.name)
record_time
- get_site_by_guid(guid)
Fetch a site by its GUID within this project scope.
- get_site_by_name(name, allow_first_match=False)
Fetch a site by its name within this project scope.
- get_well_by_name(name, allow_first_match=False)
Fetch a well by its name.
- refresh_attributes()
Fetch semantic attributes for this semantic and merge into
_data.Expects the API payload shape to be paged, with the attribute list in
payload["content"].