organization
Pydantic models related to organizations.
The organization is the billing / quota / tenancy boundary.
AdminOwnershipTransfer
pydantic-model
¶
Bases: BaseModel
Hand an organization to one of its members, by an administrator.
The recovery path for an organization whose owner is unreachable: the current owner becomes an admin and both are told by email. Audited with the administrator as the actor.
Fields:
-
new_owner_user_id(UUID)
new_owner_user_id
pydantic-field
¶
The member who becomes the owner.
MemberUsageOut
pydantic-model
¶
Bases: BaseModel
One member's share of the organization's usage.
Read by the organization's owner and admins, who pay for what every member holds but cannot open a colleague's private projects: the figures say where the space and the credits go without naming what is in them.
Config:
frozen:True
Fields:
-
user_id(UUID) -
email(str) -
name(str | None) -
role(MembershipRole) -
storage_bytes(int) -
private_storage_bytes(int) -
project_count(int) -
analysis_count(int) -
credits_used(float)
analysis_count
pydantic-field
¶
The member's analyses that are neither deleted nor failed, cancelled or rejected.
credits_used
pydantic-field
¶
Credits the organization has spent or reserved on those analyses.
email
pydantic-field
¶
The member's email address.
name = None
pydantic-field
¶
The member's display name, if set.
private_storage_bytes
pydantic-field
¶
The part of storage_bytes inside the member's private projects, which only they can open or free.
project_count
pydantic-field
¶
Projects the member owns in the organization, private ones included.
role
pydantic-field
¶
The member's role in the organization.
storage_bytes
pydantic-field
¶
Bytes the member's recordings, results and exports hold against the organization's storage ceiling, private projects included.
user_id
pydantic-field
¶
The member's user id.
Organization
pydantic-model
¶
Bases: BaseModel
Canonical Organization model — the billing/quota/tenancy boundary.
Config:
from_attributes:Truefrozen:True
Fields:
-
id(UUID) -
name(str) -
storage_ceiling_gb(int | None) -
seat_limit(int | None) -
study_limit(int | None) -
project_limit(int | None) -
storage_insolvent_since(datetime | None) -
platform_operated(bool) -
analyses_at_site(bool) -
recordings_at_site(bool) -
site_compute_factor(float | None) -
created_at(datetime) -
deleted_at(datetime | None)
analyses_at_site = False
pydantic-field
¶
Whether the organisation's analyses run at its site, on its own runners, instead of on the platform. Set by a platform administrator while the organisation holds site compute.
created_at
pydantic-field
¶
Creation timestamp
deleted_at = None
pydantic-field
¶
Soft-delete timestamp, if deleted
id
pydantic-field
¶
Unique identifier of the organization
name
pydantic-field
¶
Display name of the organization
platform_operated = False
pydantic-field
¶
Whether the platform operates the organisation itself, as for a demonstration site.
project_limit = None
pydantic-field
¶
Per-org override of how many projects the organization may hold. Null = the configured default. Admin-set.
recordings_at_site = False
pydantic-field
¶
Whether the organisation's new projects keep their recordings in its own bucket. Set by a platform administrator while the organisation holds site storage; a project keeps where it is stored.
seat_limit = None
pydantic-field
¶
Per-org override of how many members plus pending invitations the organization may hold. Null = the configured default. Admin-set.
site_compute_factor = None
pydantic-field
¶
The organisation's own factor on the platform price for analyses run at its site. Null = the platform's factor. Admin-set.
storage_ceiling_gb = None
pydantic-field
¶
Per-org storage-ceiling override (GB). Null = the configured default ceiling. Admin-set.
storage_insolvent_since = None
pydantic-field
¶
When the org's balance stopped covering its daily storage debit (start of the grace window). Null = solvent. Stored data is purged after the configured grace period.
study_limit = None
pydantic-field
¶
Per-org override of how many studies one project may hold. Null = the configured default.
OrganizationUpdate
pydantic-model
¶
OrganizationUsageOut
pydantic-model
¶
Bases: BaseModel
The organization's usage against its ceilings, member by member.
The owner's and admins' answer to "what fills the storage": the same totals every member sees on the account page, then one row per member, largest holder first. Private projects count, because the organization pays for them; their names and contents do not appear here.
Config:
frozen:True
Fields:
-
storage_bytes(int) -
storage_ceiling_bytes(int) -
project_count(int) -
project_cap(int | None) -
members(list[MemberUsageOut])
members
pydantic-field
¶
One row per member, the largest storage holder first; ties keep the members' order (owner, admins, then by joining date).
project_cap = None
pydantic-field
¶
Projects the organization may hold; null when uncapped.
project_count
pydantic-field
¶
Projects in the organization.
storage_bytes
pydantic-field
¶
Bytes the organization holds against its storage ceiling.
storage_ceiling_bytes
pydantic-field
¶
The organization's storage ceiling, in bytes.
OwnershipTransfer
pydantic-model
¶
Bases: BaseModel
Hand the organization to another member (owner only).
The current owner becomes an admin. The password is re-entered because the transfer hands over every project, member and credit of the organization in one step.
Fields:
UserOrganizationOut
pydantic-model
¶
Bases: BaseModel
The caller's organization, as the caller sees it.
A member-level view: identity, the caller's own role and membership, and
the seat picture. Admin-only organization details (overrides, insolvency
state) stay on :class:Organization behind the admin endpoints.
Every account belongs to exactly one organization: the one created for it at sign-up, or the one it joined by invitation. Projects, credits and storage all belong to it.
Config:
frozen:True
Fields:
-
id(UUID) -
name(str) -
role(MembershipRole) -
membership_id(UUID | None) -
member_count(int) -
seat_limit(int | None) -
study_limit(int | None) -
project_limit(int | None) -
storage_ceiling_gb(float | None) -
analyses_at_site(bool) -
recordings_at_site(bool) -
created_at(datetime) -
project_count(int)
analyses_at_site = False
pydantic-field
¶
Whether the organization's analyses run at its site, on its own runners, instead of on the platform.
created_at
pydantic-field
¶
When the organization was created
id
pydantic-field
¶
Unique identifier of the organization
member_count = 1
pydantic-field
¶
Members of the organization, the caller included.
membership_id = None
pydantic-field
¶
The caller's membership in this organization; the id to address when leaving it.
name
pydantic-field
¶
Display name of the organization
project_count = 0
pydantic-field
¶
Projects in the organization. On accepting an invitation elsewhere they come along, private.
project_limit = None
pydantic-field
¶
Projects the organization may hold; null when unlimited.
recordings_at_site = False
pydantic-field
¶
Whether the organization's new projects keep their recordings in its own bucket.
role
pydantic-field
¶
The caller's role in this organization.
seat_limit = None
pydantic-field
¶
Members plus pending invitations the organization may hold; null when unlimited.
storage_ceiling_gb = None
pydantic-field
¶
The storage the organization may use, in GB. The ceiling in force, not an override.
study_limit = None
pydantic-field
¶
Studies one of the organization's projects may hold.