Tenancies Class

Tenancies interface

Access to the tenancies 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", encoding="utf-8") as tokenfile:
    authtoken = tokenfile.read().strip()

# Initialize connection to Archivist
arch = Archivist(
tenancy = arch.tenancies.read(...)
class archivist.tenancies.Tenant[source]

Tenant object

class archivist.tenancies._TenanciesClient(archivist_instance: archivist.Archivist)[source]


Access to tenants entities using CRUD interface. This class is usually accessed as an attribute of the Archivist class.


archivist (Archivist) -- Archivist instance

_identity(identity) str[source]

Returns identity suitable for endpoint

publicinfo(identity: str) Tenant[source]

Read Tenant public info

Reads Tenant public info


identity (str) -- tenancies identity e.g. tenancies/xxxxxxxxxxxxxxxxxxxxxxx or tenant/xxxxxxxxxxxxxxxxxxxxxxx

The tenant identity returned by most endpoints has the prefix 'tenant/'. However the tenancies endpoint expects 'tenancies/'. This is a wart in the archivist API and will be fixed at some future date.


Tenant instance