Compliance
Compliance interface
Access to the compliance endpoint.
The user is not expected to use this class directly. It is an attribute of the
Archivist
class.
For example instantiate an Archivist instance and execute the methods of the class:
with open(".auth_token", mode="r") as tokenfile:
authtoken = tokenfile.read().strip()
# Initialize connection to Archivist
arch = Archivist(
"https://app.datatrails.ai",
authtoken,
)
asset = arch.compliance.compliant_at(...)
- class archivist.compliance.Compliance[source]
Compliance object has dictionary of all the compliance attributes.
- class archivist.compliance._ComplianceClient(archivist_instance: Archivist)[source]
ComplianceClient
Access to compliance entities using CRUD interface. This class is usually accessed as an attribute of the Archivist class.
- Parameters:
archivist (Archivist) --
Archivist
instance
- compliant_at(asset_id, *, compliant_at: bool | None = None, report: str | None = None) Compliance [source]
Reads compliance of a particular asset.
- Parameters:
asset_id (str) -- asset identity e.g. assets/xxxxxxxxxxxxxxxxxxxxxxx
compliant_at (str) -- datetime to check compliance at a particular time (optional). format: rfc3339 - UTC only https://datatracker.ietf.org/doc/html/rfc3339#section-4.1
report (bool) -- if true output report
page_size (int) -- optional page size. (Rarely used).
- Returns:
Compliance
instance