Docs

Python: Organizations, projects and keys

Manage organizations, members, invites, roles, project settings, API keys and project databases with the Python SDK.

Updated Oct 16, 2026

These methods manage your Sovaria account — organizations, team members, projects, keys and databases. They need a team member's session (console_login or a CLI token), never an app user's.

Methods

sovaria.accept_org_invite

Accept org invite.

await sovaria.accept_org_invite(token: str) -> dict[str, Any]

Parameters

tokenstrrequired
Returns
dict[str, Any]

sovaria.add_member

Add a user as a member of an org/project node.

await sovaria.add_member(
    org_id: str,
    user_id: str,
    role: str = 'MEMBER',
) -> dict[str, Any]

Parameters

org_idstrrequired
user_idstrrequired
rolestroptionaldefault 'MEMBER'
Returns
dict[str, Any]

sovaria.create_api_key

Create api key.

await sovaria.create_api_key(
    *, name: str,
    role: str = 'service_role',
    metadata: dict[str, Any] | None = None,
) -> dict[str, Any]

Parameters

namestrrequired
A label for the key.
rolestroptionaldefault 'service_role'
What it can do; service_role bypasses policies (servers only).
metadatadict[str, Any] | Noneoptionaldefault None
Your own notes.
Returns
dict[str, Any]
  • The key value is returned once — store it in a secret manager.

sovaria.create_edge

Connect two DAPG nodes with a typed relationship.

await sovaria.create_edge(
    source_node_id: str,
    target_node_id: str,
    relation_type: str,
    role: str | None = None,
) -> EdgeResponse

Parameters

source_node_idstrrequired
target_node_idstrrequired
relation_typestrrequired
rolestr | Noneoptionaldefault None
Returns
EdgeResponse

sovaria.create_node

Create a DAPG node (ORG / PROJECT / ENV / USER).

await sovaria.create_node(
    node_type: str,
    name: str,
    metadata: dict[str, Any] | None = None,
) -> NodeResponse

Parameters

node_typestrrequired
namestrrequired
metadatadict[str, Any] | Noneoptionaldefault None
Returns
NodeResponse

sovaria.create_org_invite

Create org invite.

await sovaria.create_org_invite(
    org_id: str,
    email: str,
    role: str,
) -> dict[str, Any]

Parameters

org_idstrrequired
Organization id.
emailstrrequired
Invitee.
rolestrrequired
OWNER, ADMIN, MEMBER or VIEWER.
Returns
dict[str, Any]

sovaria.delete_org

Delete org.

await sovaria.delete_org(org_id: str) -> dict[str, Any]

Parameters

org_idstrrequired
Returns
dict[str, Any]

sovaria.ensure_default_api_keys

Ensure default api keys.

await sovaria.ensure_default_api_keys() -> list[dict[str, Any]]
Returns
list[dict[str, Any]]

sovaria.get_children

List child nodes attached by a relation (e.g.

await sovaria.get_children(
    parent_id: str,
    relation: str = 'OWNS',
) -> list[dict[str, Any]]

OWNS, HAS_ENV).

Parameters

parent_idstrrequired
relationstroptionaldefault 'OWNS'
Returns
list[dict[str, Any]]

sovaria.get_context

Resolve a user's roles on a resource by walking the DAPG.

await sovaria.get_context(
    user_id: str,
    resource_id: str,
) -> ContextManifest

Parameters

user_idstrrequired
resource_idstrrequired
Returns
ContextManifest

sovaria.get_node

Fetch a single graph node by ID.

await sovaria.get_node(node_id: str) -> dict[str, Any]

Parameters

node_idstrrequired
Returns
dict[str, Any]

sovaria.get_project_ref

Get project ref.

await sovaria.get_project_ref(project_id: str) -> dict[str, Any]

Parameters

project_idstrrequired
Returns
dict[str, Any]

sovaria.get_project_settings

Get project settings.

await sovaria.get_project_settings() -> dict[str, Any]
Returns
dict[str, Any]

sovaria.get_role_catalog

Get role catalog.

await sovaria.get_role_catalog() -> dict[str, Any]
Returns
dict[str, Any]

sovaria.get_role_matrix

Get role matrix.

await sovaria.get_role_matrix() -> dict[str, Any]
Returns
dict[str, Any]

sovaria.governance_delete_tenant_database

Governance delete tenant database.

await sovaria.governance_delete_tenant_database(
    org_id: str,
    project_id: str,
    *, snapshot: bool = True,
) -> dict[str, Any]

Parameters

org_idstrrequired
project_idstrrequired
snapshotbooloptionaldefault True
Returns
dict[str, Any]

sovaria.governance_get_tenant

Governance get tenant.

await sovaria.governance_get_tenant(org_id: str) -> dict[str, Any]

Parameters

org_idstrrequired
Returns
dict[str, Any]

sovaria.governance_get_tenant_database_connection

Governance get tenant database connection.

await sovaria.governance_get_tenant_database_connection(
    org_id: str,
    project_id: str,
) -> dict[str, Any]

Parameters

org_idstrrequired
project_idstrrequired
Returns
dict[str, Any]

sovaria.governance_list_regions

Governance list regions.

await sovaria.governance_list_regions() -> list[dict[str, Any]]
Returns
list[dict[str, Any]]

sovaria.governance_list_tenant_database_backups

Governance list tenant database backups.

await sovaria.governance_list_tenant_database_backups(
    org_id: str,
    project_id: str,
    *, limit: int = 5,
) -> list[dict[str, Any]]

Parameters

org_idstrrequired
project_idstrrequired
limitintoptionaldefault 5
Returns
list[dict[str, Any]]

sovaria.governance_list_tenant_databases

Governance list tenant databases.

await sovaria.governance_list_tenant_databases(
    org_id: str,
) -> list[dict[str, Any]]

Parameters

org_idstrrequired
Returns
list[dict[str, Any]]

sovaria.governance_pause_tenant_database

Governance pause tenant database.

await sovaria.governance_pause_tenant_database(
    org_id: str,
    project_id: str,
) -> dict[str, Any]

Parameters

org_idstrrequired
project_idstrrequired
Returns
dict[str, Any]

sovaria.governance_project_metrics

Governance project metrics.

await sovaria.governance_project_metrics(
    project_id: str,
    *, since: str = '24',
    limit: int = 500,
) -> dict[str, Any]

Parameters

project_idstrrequired
sincestroptionaldefault '24'
limitintoptionaldefault 500
Returns
dict[str, Any]

sovaria.governance_provision_tenant_database

Governance provision tenant database.

await sovaria.governance_provision_tenant_database(
    org_id: str,
    *, project_id: str,
    tier: str = 'dedicated',
    region: str | None = None,
) -> dict[str, Any]

Parameters

org_idstrrequired
project_idstrrequired
tierstroptionaldefault 'dedicated'
regionstr | Noneoptionaldefault None
Returns
dict[str, Any]

sovaria.governance_regions_available

Governance regions available.

await sovaria.governance_regions_available(
    *, size: str = 'micro',
    plan: str | None = None,
) -> list[dict[str, Any]]

Parameters

sizestroptionaldefault 'micro'
planstr | Noneoptionaldefault None
Returns
list[dict[str, Any]]

sovaria.governance_resize_tenant_database

Governance resize tenant database.

await sovaria.governance_resize_tenant_database(
    org_id: str,
    project_id: str,
    compute_size: str,
) -> dict[str, Any]

Parameters

org_idstrrequired
project_idstrrequired
compute_sizestrrequired
Returns
dict[str, Any]

sovaria.governance_resume_tenant_database

Governance resume tenant database.

await sovaria.governance_resume_tenant_database(
    org_id: str,
    project_id: str,
) -> dict[str, Any]

Parameters

org_idstrrequired
project_idstrrequired
Returns
dict[str, Any]

sovaria.governance_reveal_tenant_database_connection

Governance reveal tenant database connection.

await sovaria.governance_reveal_tenant_database_connection(
    org_id: str,
    project_id: str,
) -> dict[str, Any]

Parameters

org_idstrrequired
project_idstrrequired
Returns
dict[str, Any]

sovaria.governance_trigger_tenant_database_backup

Governance trigger tenant database backup.

await sovaria.governance_trigger_tenant_database_backup(
    org_id: str,
    project_id: str,
) -> dict[str, Any]

Parameters

org_idstrrequired
project_idstrrequired
Returns
dict[str, Any]

sovaria.list_api_keys

List api keys.

await sovaria.list_api_keys() -> list[dict[str, Any]]
Returns
list[dict[str, Any]]

sovaria.list_nodes

List graph nodes; when provided, node_type filters by type.

await sovaria.list_nodes(
    node_type: str | None = None,
) -> list[dict[str, Any]]

Parameters

node_typestr | Noneoptionaldefault None
Returns
list[dict[str, Any]]

sovaria.list_org_members

List org members.

await sovaria.list_org_members(org_id: str) -> list[dict[str, Any]]

Parameters

org_idstrrequired
Returns
list[dict[str, Any]]

sovaria.remove_org_member

Remove org member.

await sovaria.remove_org_member(
    org_id: str,
    user_id: str,
) -> dict[str, Any]

Parameters

org_idstrrequired
user_idstrrequired
Returns
dict[str, Any]

sovaria.revoke_api_key

Revoke api key.

await sovaria.revoke_api_key(key_id: str) -> dict[str, Any]

Parameters

key_idstrrequired
Returns
dict[str, Any]

sovaria.update_member_role

Update member role.

await sovaria.update_member_role(
    org_id: str,
    user_id: str,
    role: str,
) -> dict[str, Any]

Parameters

org_idstrrequired
user_idstrrequired
rolestrrequired
Returns
dict[str, Any]

sovaria.update_org

Update org.

await sovaria.update_org(
    org_id: str,
    body: dict[str, Any],
) -> dict[str, Any]

Parameters

org_idstrrequired
bodydict[str, Any]required
Returns
dict[str, Any]

sovaria.update_project_settings

Update project settings.

await sovaria.update_project_settings(
    settings: dict[str, Any],
) -> dict[str, Any]

Parameters

settingsdict[str, Any]required
Returns
dict[str, Any]

sovaria.update_role_matrix

Update role matrix.

await sovaria.update_role_matrix(
    matrix: dict[str, list[str]],
) -> dict[str, Any]

Parameters

matrixdict[str, list[str]]required
Returns
dict[str, Any]
Something unclear or missing on this page?Tell us