Skip to content

API reference

Clients

hubuum_client.Client

Blocking client for the Hubuum server API.

Use the client as a context manager so its connection pool is closed deterministically. request is the safe extension point for routes that do not yet have a dedicated service method.

_base_url instance-attribute

_base_url = normalize_base_url(base_url)

_http instance-attribute

_http = httpx.Client(
    base_url=self._base_url,
    timeout=client_options.timeout,
    verify=client_options.verify,
    transport=transport,
    headers={
        "User-Agent": client_options.user_agent
        or f"hubuum-client-python/{__version__}"
    },
)

_token instance-attribute

_token = (
    AccessToken(token) if isinstance(token, str) else token
)

base_url property

base_url

Return the validated server base URL, including its trailing slash.

class_relations cached property

class_relations

Return typed class-relation operations.

classes cached property

classes

Return typed class and nested-object operations.

collections cached property

collections

Return typed collection CRUD and hierarchy operations.

credential_approvals cached property

credential_approvals

Return operation-bound password approval and evidence operations.

exports cached property

exports

Return typed asynchronous-export and output operations.

groups cached property

groups

Return typed group and membership operations.

imports cached property

imports

Return typed asynchronous-import operations.

is_authenticated property

is_authenticated

Return whether the client currently holds an access token.

object_relations cached property

object_relations

Return typed object-relation operations.

openapi property

openapi

Return the complete operation-ID interface for all 220 v0.0.16 operations.

tasks cached property

tasks

Return task inspection, event, pagination, and polling operations.

token property

token

Return the current redacted token value, if authenticated.

tokens cached property

tokens

Return typed principal-token operations.

users cached property

users

Return typed user lifecycle operations.

__enter__

__enter__()

__exit__

__exit__(*_)

__init__

__init__(
    base_url, *, token=None, options=None, transport=None
)

_build_request

_build_request(method, path, *, json, options)

_request_response

_request_response(method, path, *, json=None, options=None)

_request_stream_response

_request_stream_response(
    method, path, *, json=None, options=None
)

_send_request

_send_request(request, request_body, *, stream)

close

close()

Close the HTTP connection pool owned by this client.

config

config()

Return client-safe public server configuration.

healthz

healthz()

Return the unauthenticated process-health probe.

login

login(credentials)

Authenticate this client in place and retain the returned token.

logout

logout()

Revoke the current session and clear the local token in all cases.

me

me()

Return the authenticated principal and current token metadata.

metrics

metrics()

Return Prometheus exposition text from the default /metrics path.

metrics_at

metrics_at(path)

Return unauthenticated metrics text from an origin-locked custom path.

readyz

readyz()

Return the unauthenticated dependency-readiness probe.

request

request(
    method: str,
    path: str,
    *,
    json: BaseModel
    | Mapping[str, Any]
    | list[Any]
    | None = None,
    response_model: type[T],
    options: RequestOptions | None = None,
) -> T
request(
    method: str,
    path: str,
    *,
    json: BaseModel
    | Mapping[str, Any]
    | list[Any]
    | None = None,
    response_model: None = None,
    options: RequestOptions | None = None,
) -> Any
request(
    method,
    path,
    *,
    json=None,
    response_model=None,
    options=None,
)

Send an authenticated, origin-locked request to a relative API path.

Supply response_model to validate a JSON response. Prefer a typed resource service when one exists; this method is the constrained extension point for server routes outside that surface.

stream

stream(method, path, *, json=None, options=None)

Stream one origin-locked response without exposing request secrets.

hubuum_client.AsyncClient

Async client with the same resource surface as :class:Client.

_base_url instance-attribute

_base_url = normalize_base_url(base_url)

_http instance-attribute

_http = httpx.AsyncClient(
    base_url=self._base_url,
    timeout=client_options.timeout,
    verify=client_options.verify,
    transport=transport,
    headers={
        "User-Agent": client_options.user_agent
        or f"hubuum-client-python/{__version__}"
    },
)

_token instance-attribute

_token = (
    AccessToken(token) if isinstance(token, str) else token
)

base_url property

base_url

Return the validated server base URL, including its trailing slash.

class_relations cached property

class_relations

Return typed class-relation operations.

classes cached property

classes

Return typed class and nested-object operations.

collections cached property

collections

Return typed collection CRUD and hierarchy operations.

credential_approvals cached property

credential_approvals

Return operation-bound password approval and evidence operations.

exports cached property

exports

Return typed asynchronous-export and output operations.

groups cached property

groups

Return typed group and membership operations.

imports cached property

imports

Return typed asynchronous-import operations.

is_authenticated property

is_authenticated

Return whether the client currently holds an access token.

object_relations cached property

object_relations

Return typed object-relation operations.

openapi property

openapi

Return the complete operation-ID interface for all 220 v0.0.16 operations.

tasks cached property

tasks

Return task inspection, event, pagination, and polling operations.

token property

token

Return the current redacted token value, if authenticated.

tokens cached property

tokens

Return typed principal-token operations.

users cached property

users

Return typed user lifecycle operations.

__aenter__ async

__aenter__()

__aexit__ async

__aexit__(*_)

__init__

__init__(
    base_url, *, token=None, options=None, transport=None
)

_build_request

_build_request(method, path, *, json, options)

_request_response async

_request_response(method, path, *, json=None, options=None)

_request_stream_response async

_request_stream_response(
    method, path, *, json=None, options=None
)

_send_request async

_send_request(request, request_body, *, stream)

close async

close()

Close the HTTP connection pool owned by this client.

config async

config()

Return client-safe public server configuration.

healthz async

healthz()

Return the unauthenticated process-health probe.

login async

login(credentials)

Authenticate this client in place and retain the returned token.

logout async

logout()

Revoke the current session and clear the local token in all cases.

me async

me()

Return the authenticated principal and current token metadata.

metrics async

metrics()

Return Prometheus exposition text from the default /metrics path.

metrics_at async

metrics_at(path)

Return unauthenticated metrics text from an origin-locked custom path.

readyz async

readyz()

Return the unauthenticated dependency-readiness probe.

request async

request(
    method: str,
    path: str,
    *,
    json: BaseModel
    | Mapping[str, Any]
    | list[Any]
    | None = None,
    response_model: type[T],
    options: RequestOptions | None = None,
) -> T
request(
    method: str,
    path: str,
    *,
    json: BaseModel
    | Mapping[str, Any]
    | list[Any]
    | None = None,
    response_model: None = None,
    options: RequestOptions | None = None,
) -> Any
request(
    method,
    path,
    *,
    json=None,
    response_model=None,
    options=None,
)

Send an authenticated, origin-locked request to a relative API path.

Supply response_model to validate a JSON response. Prefer a typed resource service when one exists; this method is the constrained extension point for server routes outside that surface.

stream async

stream(method, path, *, json=None, options=None)

Stream one origin-locked response without exposing request secrets.

hubuum_client.ClientOptions dataclass

Connection behavior shared by synchronous and asynchronous clients.

timeout class-attribute instance-attribute

timeout = 30.0

user_agent class-attribute instance-attribute

user_agent = None

verify class-attribute instance-attribute

verify = True

__init__

__init__(timeout=30.0, verify=True, user_agent=None)

hubuum_client.RequestOptions dataclass

Transport controls for one origin-locked request.

authenticated class-attribute instance-attribute

authenticated = True

headers class-attribute instance-attribute

headers = field(default=None, repr=False)

params class-attribute instance-attribute

params = field(default=None, repr=False)

__init__

__init__(params=None, headers=None, authenticated=True)

hubuum_client.OpenAPIOptions dataclass

Path, query, header, and response controls for an OpenAPI operation.

accept class-attribute instance-attribute

accept = None

content_type class-attribute instance-attribute

content_type = None

headers class-attribute instance-attribute

headers = field(default=None, repr=False)

params class-attribute instance-attribute

params = field(default=None, repr=False)

path_params class-attribute instance-attribute

path_params = None

__init__

__init__(
    path_params=None,
    params=None,
    headers=None,
    accept=None,
    content_type=None,
)

hubuum_client.OperationSpec

Bases: NamedTuple

method instance-attribute

method

operation_id instance-attribute

operation_id

path instance-attribute

path

request_media_type instance-attribute

request_media_type

request_media_types property

request_media_types

Request media types declared by the pinned contract.

response_media_types property

response_media_types

Successful response media types declared by the pinned contract.

hubuum_client.OpenAPIOperations

Invoke every operation in Hubuum v0.0.16 by its stable OpenAPI operationId.

_client instance-attribute

_client = client

operation_ids property

operation_ids

__init__

__init__(client)

call

call(operation_id, *, json=None, options=None)

operation

operation(operation_id)

stream

stream(operation_id, *, json=None, options=None)

hubuum_client.AsyncOpenAPIOperations

Asynchronous operation-ID interface for the complete v0.0.16 contract.

_client instance-attribute

_client = client

operation_ids property

operation_ids

__init__

__init__(client)

call async

call(operation_id, *, json=None, options=None)

operation

operation(operation_id)

stream async

stream(operation_id, *, json=None, options=None)

hubuum_client.ResponseStream

A synchronous response body consumed inside Client.stream().

__slots__ class-attribute instance-attribute

__slots__ = ('_response',)

_response instance-attribute

_response = response

headers property

headers

status_code property

status_code

__init__

__init__(response)

iter_bytes

iter_bytes()

iter_lines

iter_lines()

iter_text

iter_text()

hubuum_client.AsyncResponseStream

An asynchronous response body consumed inside AsyncClient.stream().

__slots__ class-attribute instance-attribute

__slots__ = ('_response',)

_response instance-attribute

_response = response

headers property

headers

status_code property

status_code

__init__

__init__(response)

iter_bytes

iter_bytes()

iter_lines

iter_lines()

iter_text

iter_text()

Task-backed services

hubuum_client.services.TasksService

Inspect, paginate, and wait for asynchronous Hubuum tasks.

_client instance-attribute

_client = client

_service instance-attribute

_service = _CursorService[Task](
    client, collection_path="/api/v1/tasks", model=Task
)

__init__

__init__(client)

all

all(query=None, *, max_pages=100, max_items=10000)

Collect visible tasks with explicit page and item safety bounds.

all_events

all_events(
    task_id, query=None, *, max_pages=100, max_items=10000
)

Collect a task's events with explicit page and item bounds.

cancel

cancel(task_id, payload=None)

Request cancellation; 202 means cleanup is pending, so use wait() for completion.

event_pages

event_pages(task_id, query=None, *, max_pages=100)

Iterate bounded cursor pages from a task's event history.

events

events(task_id, query=None)

Return one page from a task's event history as a list.

events_page

events_page(task_id, query=None)

Return one cursor page from a task's event history.

get

get(task_id)

Return a task by numeric ID.

list

list(query=None)

Return one page of visible tasks as a list.

page

page(query=None)

Return one cursor page of visible tasks.

pages

pages(query=None, *, max_pages=100)

Iterate bounded cursor pages of visible tasks.

wait

wait(task_id, *, timeout_seconds=300.0, poll_interval=0.5)

Poll until a task reaches a terminal state or the timeout expires.

hubuum_client.async_services.AsyncTasksService

Inspect, paginate, and wait for asynchronous Hubuum tasks.

_client instance-attribute

_client = client

_service instance-attribute

_service = _AsyncCursorService[Task](
    client, collection_path="/api/v1/tasks", model=Task
)

__init__

__init__(client)

all async

all(query=None, *, max_pages=100, max_items=10000)

Collect visible tasks with explicit page and item safety bounds.

all_events async

all_events(
    task_id, query=None, *, max_pages=100, max_items=10000
)

Collect a task's events with explicit page and item bounds.

cancel async

cancel(task_id, payload=None)

Request cancellation; 202 means cleanup is pending, so use wait() for completion.

event_pages async

event_pages(task_id, query=None, *, max_pages=100)

Iterate bounded cursor pages from a task's event history.

events async

events(task_id, query=None)

Return one page from a task's event history as a list.

events_page async

events_page(task_id, query=None)

Return one cursor page from a task's event history.

get async

get(task_id)

Return a task by numeric ID.

list async

list(query=None)

Return one page of visible tasks as a list.

page async

page(query=None)

Return one cursor page of visible tasks.

pages async

pages(query=None, *, max_pages=100)

Iterate bounded cursor pages of visible tasks.

wait async

wait(task_id, *, timeout_seconds=300.0, poll_interval=0.5)

Poll until a task reaches a terminal state or the timeout expires.

hubuum_client.services.ImportsService

Submit imports and inspect their task and per-entity outcomes.

_client instance-attribute

_client = client

__init__

__init__(client)

_results_service

_results_service(task_id)

all_results

all_results(
    task_id, query=None, *, max_pages=100, max_items=10000
)

Collect import outcomes with explicit page and item bounds.

get

get(task_id)

Return an import task through its domain-specific route.

result_pages

result_pages(task_id, query=None, *, max_pages=100)

Iterate bounded cursor pages of per-entity import outcomes.

results

results(task_id, query=None)

Return one page of per-entity import outcomes as a list.

results_page

results_page(task_id, query=None)

Return one cursor page of per-entity import outcomes.

run

run(
    payload,
    *,
    idempotency_key=None,
    approval=None,
    timeout_seconds=300.0,
    poll_interval=0.5,
)

Submit, await, and collect all outcomes for one import task.

submit

submit(payload, *, idempotency_key=None, approval=None)

Submit an import task, optionally with a replay-safe idempotency key.

hubuum_client.async_services.AsyncImportsService

Async import submission and per-entity outcome inspection.

_client instance-attribute

_client = client

__init__

__init__(client)

_results_service

_results_service(task_id)

all_results async

all_results(
    task_id, query=None, *, max_pages=100, max_items=10000
)

Collect import outcomes with explicit page and item bounds.

get async

get(task_id)

Return an import task through its domain-specific route.

result_pages async

result_pages(task_id, query=None, *, max_pages=100)

Iterate bounded cursor pages of per-entity import outcomes.

results async

results(task_id, query=None)

Return one page of per-entity import outcomes as a list.

results_page async

results_page(task_id, query=None)

Return one cursor page of per-entity import outcomes.

run async

run(
    payload,
    *,
    idempotency_key=None,
    approval=None,
    timeout_seconds=300.0,
    poll_interval=0.5,
)

Submit, await, and collect all outcomes for one import task.

submit async

submit(payload, *, idempotency_key=None, approval=None)

Submit an import task, optionally with a replay-safe idempotency key.

hubuum_client.services.ExportsService

Submit exports and retrieve their typed or rendered output.

_client instance-attribute

_client = client

__init__

__init__(client)

get

get(task_id)

Return an export task through its domain-specific route.

output

output(task_id)

Return JSON output as a model and rendered output as text.

output_stream

output_stream(task_id)

Stream export output while keeping the response lifetime bounded.

run

run(
    payload,
    *,
    idempotency_key=None,
    timeout_seconds=300.0,
    poll_interval=0.5,
)

Submit and await an export, then return its generated output.

submit

submit(payload, *, idempotency_key=None)

Submit an export task, optionally with a replay-safe idempotency key.

hubuum_client.async_services.AsyncExportsService

Async export submission and typed or rendered output retrieval.

_client instance-attribute

_client = client

__init__

__init__(client)

get async

get(task_id)

Return an export task through its domain-specific route.

output async

output(task_id)

Return JSON output as a model and rendered output as text.

output_stream async

output_stream(task_id)

Stream export output while keeping the response lifetime bounded.

run async

run(
    payload,
    *,
    idempotency_key=None,
    timeout_seconds=300.0,
    poll_interval=0.5,
)

Submit and await an export, then return its generated output.

submit async

submit(payload, *, idempotency_key=None)

Submit an export task, optionally with a replay-safe idempotency key.

Schema services

hubuum_client.services.ClassSchemaService

Stage, inspect, and explicitly activate one class's schema revisions.

_base instance-attribute

_base = f'/api/v1/classes/{_segment(class_id)}/schema'

_client instance-attribute

_client = client

__init__

__init__(client, class_id)

abandon

abandon(revision)

Abandon a staged revision.

activate

activate(revision, payload)

Activate with an explicit policy and expected active schema revision.

cancel

cancel(task_id)

Cancel schema work while retaining already committed findings.

generate_report

generate_report(task_id, payload)

Generate and retain HTML from saved diagnostics.

get

get()

Return the active schema and administrator compliance counts.

impact

impact(revision)

Queue an impact analysis against the current object population.

objects

objects(options=None, *, status=None)

Read authorized evidence; resume with next_after even after an empty page.

report

report(task_id, *, download=False)

Read retained HTML, optionally requesting an attachment response.

revalidate

revalidate(revision)

Queue revalidation of the active revision without changing object data.

revision

revision(revision)

Read one immutable schema revision.

revisions

revisions(options=None)

Read one bounded revision page; resume after its last revision.

stage

stage(payload)

Stage a policy without changing active validation.

work

work(task_id)

Read saved diagnostics and current readiness for a schema task.

hubuum_client.async_services.AsyncClassSchemaService

Stage, inspect, and explicitly activate one class's schema revisions.

_base instance-attribute

_base = f'/api/v1/classes/{_segment(class_id)}/schema'

_client instance-attribute

_client = client

__init__

__init__(client, class_id)

abandon async

abandon(revision)

Abandon a staged revision.

activate async

activate(revision, payload)

Activate with an explicit policy and expected active schema revision.

cancel async

cancel(task_id)

Cancel schema work while retaining already committed findings.

generate_report async

generate_report(task_id, payload)

Generate and retain HTML from saved diagnostics.

get async

get()

Return the active schema and administrator compliance counts.

impact async

impact(revision)

Queue an impact analysis against the current object population.

objects async

objects(options=None, *, status=None)

Read authorized evidence; resume with next_after even after an empty page.

report async

report(task_id, *, download=False)

Read retained HTML, optionally requesting an attachment response.

revalidate async

revalidate(revision)

Queue revalidation of the active revision without changing object data.

revision async

revision(revision)

Read one immutable schema revision.

revisions async

revisions(options=None)

Read one bounded revision page; resume after its last revision.

stage async

stage(payload)

Stage a policy without changing active validation.

work async

work(task_id)

Read saved diagnostics and current readiness for a schema task.

hubuum_client.SchemaPageOptions dataclass

Numeric continuation controls for schema revisions and object compliance.

hubuum_client.SchemaStageRequest

Bases: RequestModel

hubuum_client.SchemaActivationRequest

Bases: RequestModel

hubuum_client.SchemaActivationPolicy

Bases: StrEnum

hubuum_client.SchemaRepairReportRequest

Bases: RequestModel

hubuum_client.SchemaRevisionResponse

Bases: HubuumModel

hubuum_client.SchemaActivationResponse

Bases: HubuumModel

hubuum_client.ClassSchemaResponse

Bases: HubuumModel

hubuum_client.SchemaCompliancePage

Bases: HubuumModel

hubuum_client.ObjectComplianceResponse

Bases: HubuumModel

hubuum_client.ObjectSchemaEvidence

Bases: HubuumModel

hubuum_client.SchemaWorkResponse

Bases: HubuumModel

hubuum_client.SchemaImpactResponse

Bases: HubuumModel

hubuum_client.SchemaDiagnostics

Bases: HubuumModel

hubuum_client.SchemaIssue

Bases: HubuumModel

hubuum_client.ImportSchemaActivation

Bases: RequestModel

hubuum_client.TaskCancelRequest

Bases: RequestModel

Idempotent cancellation, optionally conditional on the current task status.

hubuum_client.TaskRemoteSideEffectState

Bases: StrEnum

Conservative dispatch evidence; cancellation cannot undo a remote side effect.

Queries

hubuum_client.Query dataclass

Immutable query parameters for list endpoints.

Reusing a base query is safe because every fluent method returns a new value.

cursor_value class-attribute instance-attribute

cursor_value = None

filters class-attribute instance-attribute

filters = ()

include_total_value class-attribute instance-attribute

include_total_value = None

limit_value class-attribute instance-attribute

limit_value = None

sort_value class-attribute instance-attribute

sort_value = None

__init__

__init__(
    filters=(),
    limit_value=None,
    cursor_value=None,
    sort_value=None,
    include_total_value=None,
)

as_params

as_params()

cursor

cursor(value)

data

data(*path)

Select a nested object data field for a fluent JSON filter.

include_total

include_total(value=True)

limit

limit(value)

sort

sort(value)

where

where(field, value, operator=EQUALS)

hubuum_client.QueryFilter dataclass

One typed Hubuum resource filter.

field instance-attribute

field

operator instance-attribute

operator

value instance-attribute

value

__init__

__init__(field, operator, value)

as_pair

as_pair()

hubuum_client.DataField dataclass

A nested object data path selected from an immutable query.

Each terminal method returns a new :class:Query, so another data() selection or any normal query control can be chained immediately.

_path_value property

_path_value

path instance-attribute

path

query instance-attribute

query

__init__

__init__(query, path)

__post_init__

__post_init__()

_list_value staticmethod

_list_value(values)

_operator staticmethod

_operator(operator, negate)

_value_filter

_value_filter(operator, value, *, negate)

array_length

array_length(value, *, negate=False)

Match an array with exactly value elements.

between

between(lower, upper, *, negate=False)

Match a number or date inside an inclusive range.

contains

contains(value, *, negate=False)

Match a textual value containing value.

contains_all

contains_all(*values, negate=False)

Match an array containing every supplied value.

contains_ip

contains_ip(value, *, negate=False)

Match a stored network strictly containing the host IP value.

contains_network

contains_network(value, *, negate=False)

Match a stored network containing value.

ends_with

ends_with(value, *, negate=False)

Match a textual value ending with value.

equals

equals(value, *, negate=False)

Match a string, number, boolean, date, or datetime value.

gt

gt(value, *, negate=False)

Match a number or date greater than value.

gte

gte(value, *, negate=False)

Match a number or date greater than or equal to value.

has_key

has_key(key, *, negate=False)

Match an object containing key, including a JSON-null value.

icontains

icontains(value, *, negate=False)

Match a textual value containing value case-insensitively.

iends_with

iends_with(value, *, negate=False)

Match a textual value ending with value case-insensitively.

iequals

iequals(value, *, negate=False)

Match a textual value case-insensitively.

inet_equals

inet_equals(value, *, negate=False)

Match normalized PostgreSQL inet equality.

is_null

is_null(*, negate=False)

Match a missing or JSON-null path.

istarts_with

istarts_with(value, *, negate=False)

Match a textual value starting with value case-insensitively.

like

like(value, *, negate=False)

Match a textual value with the server's SQL-like semantics.

lt

lt(value, *, negate=False)

Match a number or date less than value.

lte

lte(value, *, negate=False)

Match a number or date less than or equal to value.

one_of

one_of(*values, negate=False)

Match a scalar in values or an array containing any of them.

overlaps_network

overlaps_network(value, *, negate=False)

Match a stored IP/network overlapping value.

regex

regex(value, *, negate=False)

Match a textual value using a PostgreSQL regular expression.

starts_with

starts_with(value, *, negate=False)

Match a textual value starting with value.

within_network

within_network(value, *, negate=False)

Match an IP/network stored inside value.

hubuum_client.FilterOperator

Bases: StrEnum

Operators understood by Hubuum's field__operator=value syntax.

ALL class-attribute instance-attribute

ALL = 'all'

ARRAY_LENGTH class-attribute instance-attribute

ARRAY_LENGTH = 'array_length'

BETWEEN class-attribute instance-attribute

BETWEEN = 'between'

CONTAINS class-attribute instance-attribute

CONTAINS = 'contains'

CONTAINS_IP class-attribute instance-attribute

CONTAINS_IP = 'contains_ip'

CONTAINS_NETWORK class-attribute instance-attribute

CONTAINS_NETWORK = 'contains_network'

ENDSWITH class-attribute instance-attribute

ENDSWITH = 'endswith'

EQUALS class-attribute instance-attribute

EQUALS = 'equals'

GT class-attribute instance-attribute

GT = 'gt'

GTE class-attribute instance-attribute

GTE = 'gte'

HAS_KEY class-attribute instance-attribute

HAS_KEY = 'has_key'

ICONTAINS class-attribute instance-attribute

ICONTAINS = 'icontains'

IENDSWITH class-attribute instance-attribute

IENDSWITH = 'iendswith'

IEQUALS class-attribute instance-attribute

IEQUALS = 'iequals'

IN class-attribute instance-attribute

IN = 'in'

INET_EQUALS class-attribute instance-attribute

INET_EQUALS = 'inet_equals'

ISTARTSWITH class-attribute instance-attribute

ISTARTSWITH = 'istartswith'

IS_NULL class-attribute instance-attribute

IS_NULL = 'is_null'

LIKE class-attribute instance-attribute

LIKE = 'like'

LT class-attribute instance-attribute

LT = 'lt'

LTE class-attribute instance-attribute

LTE = 'lte'

NOT_ALL class-attribute instance-attribute

NOT_ALL = 'not_all'

NOT_ARRAY_LENGTH class-attribute instance-attribute

NOT_ARRAY_LENGTH = 'not_array_length'

NOT_BETWEEN class-attribute instance-attribute

NOT_BETWEEN = 'not_between'

NOT_CONTAINS class-attribute instance-attribute

NOT_CONTAINS = 'not_contains'

NOT_CONTAINS_IP class-attribute instance-attribute

NOT_CONTAINS_IP = 'not_contains_ip'

NOT_CONTAINS_NETWORK class-attribute instance-attribute

NOT_CONTAINS_NETWORK = 'not_contains_network'

NOT_ENDSWITH class-attribute instance-attribute

NOT_ENDSWITH = 'not_endswith'

NOT_EQUALS class-attribute instance-attribute

NOT_EQUALS = 'not_equals'

NOT_GT class-attribute instance-attribute

NOT_GT = 'not_gt'

NOT_GTE class-attribute instance-attribute

NOT_GTE = 'not_gte'

NOT_HAS_KEY class-attribute instance-attribute

NOT_HAS_KEY = 'not_has_key'

NOT_ICONTAINS class-attribute instance-attribute

NOT_ICONTAINS = 'not_icontains'

NOT_IENDSWITH class-attribute instance-attribute

NOT_IENDSWITH = 'not_iendswith'

NOT_IEQUALS class-attribute instance-attribute

NOT_IEQUALS = 'not_iequals'

NOT_IN class-attribute instance-attribute

NOT_IN = 'not_in'

NOT_INET_EQUALS class-attribute instance-attribute

NOT_INET_EQUALS = 'not_inet_equals'

NOT_ISTARTSWITH class-attribute instance-attribute

NOT_ISTARTSWITH = 'not_istartswith'

NOT_IS_NULL class-attribute instance-attribute

NOT_IS_NULL = 'not_is_null'

NOT_LIKE class-attribute instance-attribute

NOT_LIKE = 'not_like'

NOT_LT class-attribute instance-attribute

NOT_LT = 'not_lt'

NOT_LTE class-attribute instance-attribute

NOT_LTE = 'not_lte'

NOT_OVERLAPS_NETWORK class-attribute instance-attribute

NOT_OVERLAPS_NETWORK = 'not_overlaps_network'

NOT_REGEX class-attribute instance-attribute

NOT_REGEX = 'not_regex'

NOT_STARTSWITH class-attribute instance-attribute

NOT_STARTSWITH = 'not_startswith'

NOT_WITHIN_NETWORK class-attribute instance-attribute

NOT_WITHIN_NETWORK = 'not_within_network'

OVERLAPS_NETWORK class-attribute instance-attribute

OVERLAPS_NETWORK = 'overlaps_network'

REGEX class-attribute instance-attribute

REGEX = 'regex'

STARTSWITH class-attribute instance-attribute

STARTSWITH = 'startswith'

WITHIN_NETWORK class-attribute instance-attribute

WITHIN_NETWORK = 'within_network'

hubuum_client.Page dataclass

Bases: Sequence[T], Generic[T]

One cursor-paginated response page.

has_next property

has_next

items instance-attribute

items

next_cursor class-attribute instance-attribute

next_cursor = None

page_limit class-attribute instance-attribute

page_limit = None

total_count class-attribute instance-attribute

total_count = None

__getitem__

__getitem__(index: int) -> T
__getitem__(index: slice) -> tuple[T, ...]
__getitem__(index)

__init__

__init__(
    items,
    next_cursor=None,
    total_count=None,
    page_limit=None,
)

__iter__

__iter__()

__len__

__len__()

hubuum_client.TokenListState

Bases: StrEnum

Retained-token lifecycle subset selected by token list operations.

ACTIVE class-attribute instance-attribute

ACTIVE = 'active'

ALL class-attribute instance-attribute

ALL = 'all'

EXPIRED class-attribute instance-attribute

EXPIRED = 'expired'

REVOKED class-attribute instance-attribute

REVOKED = 'revoked'

Core models

hubuum_client.Collection

Bases: HubuumModel

hubuum_client.HubuumClass

Bases: HubuumModel

normalize_runtime_collection classmethod

normalize_runtime_collection(value)

Normalize the server's embedded collection representation.

hubuum_client.HubuumObject

Bases: HubuumModel

hubuum_client.ObjectDataPatchOperation

Bases: RequestModel

One validated RFC 6902 operation relative to an object's data root.

payload

payload()

Keep explicit JSON-null values while omitting unused operation members.

hubuum_client.ObjectAggregateRow

Bases: HubuumModel

hubuum_client.ObjectAggregateDimensionValue

Bases: HubuumModel

hubuum_client.ObjectAggregateMeasureValue

Bases: HubuumModel

hubuum_client.User

Bases: _UserBase

User metadata returned by collection endpoints.

hubuum_client.UserPoint

Bases: _UserBase

Canonical revision-owned user returned by point mutations and reads.

hubuum_client.Group

Bases: GroupPoint

Group metadata returned by collection endpoints.

hubuum_client.GroupPoint

Bases: HubuumModel

Canonical revision-owned group returned by point mutations and reads.

hubuum_client.ClassRelation

Bases: HubuumModel

A class-to-class relation and its optional per-object cardinality limits.

hubuum_client.ObjectRelation

Bases: HubuumModel

hubuum_client.Task

Bases: HubuumModel

Generic asynchronous task with typed progress, links, and details.

hubuum_client.TaskEvent

Bases: HubuumModel

One event in a task's cursor-paginated lifecycle history.

hubuum_client.TaskProgress

Bases: HubuumModel

Typed item counters reported by an asynchronous task.

hubuum_client.TaskDetails

Bases: HubuumModel

Kind-specific task metadata exposed by Hubuum v0.0.16.

hubuum_client.ClassRelationCreate

Bases: RequestModel

Create a class relation, optionally bounding either object's relation count.

from_max_relations applies independently to each object in the source class; to_max_relations applies independently to each object in the destination class. Omit a limit for unlimited cardinality.

hubuum_client.ImportRequest

Bases: RequestModel

Versioned asynchronous import request for the complete Hubuum graph.

payload

payload()

Return the wire payload, always including the required format version.

hubuum_client.ImportGraph

Bases: RequestModel

Complete import graph with typed core resources.

Identity and integration sections remain JSON-object sequences so the complete v0.0.16 graph is accepted without exposing unstable or secret-bearing integration configuration in representations. Core collection, class, object, relation, and collection-permission sections are fully typed.

total_items property

total_items

Return the number of top-level entities submitted by this graph.

hubuum_client.ImportWriteCondition

Bases: RequestModel

One import-v2 write condition checked by the queued worker.

hubuum_client.ImportWriteMode

Bases: StrEnum

Per-item collision and revision behavior for Hubuum import v2.

hubuum_client.RestoreTimestamps

Bases: RequestModel

Original UTC timestamps restored by an authorized import.

Hubuum v0.0.16 accepts timezone-free ISO 8601 values and interprets them as UTC. The update timestamp must not precede the creation timestamp.

validate_order

validate_order()

Reject an impossible timestamp order before any network request.

hubuum_client.ImportTaskResult

Bases: HubuumModel

Outcome for one entity processed by an import task.

hubuum_client.ImportRunResult dataclass

Terminal import task and its per-entity result rows.

failed property

failed

Return the number of unsuccessful entity outcomes.

succeeded property

succeeded

Return the number of successful entity outcomes.

hubuum_client.ExportRequest

Bases: RequestModel

Typed request submitted to Hubuum's asynchronous export endpoint.

hubuum_client.ExportScope

Bases: RequestModel

Validated resource boundary for an export request.

Global collection, class, and relation scopes do not accept identifiers. objects_in_class requires only class_id; related_objects requires both identifiers.

validate_identifiers

validate_identifiers()

Reject ambiguous scope/identifier combinations before submission.

hubuum_client.ExportJsonResponse

Bases: HubuumModel

Structured output returned for application/json exports.

hubuum_client.RenderedExport dataclass

Non-JSON export output and the media type selected by the server.

hubuum_client.NewTokenRequest

Bases: RequestModel

Token-mint request using Hubuum's nested scope wire field.

hubuum_client.RenewTokenRequest

Bases: RequestModel

Optional expiry override for a renewed token.

hubuum_client.TokenScope

Bases: RequestModel

Independent permission and resource boundaries for a newly minted token.

hubuum_client.TokenResourceScope

Bases: RequestModel

One collection, class, or object included in a token boundary.

hubuum_client.PrincipalTokenMetadata

Bases: PrincipalTokenPoint

Lifecycle-aware token metadata returned by retained-token lists.

hubuum_client.PrincipalTokenPoint

Bases: _TokenMetadataBase

Canonical point-in-time token metadata without routine usage state.

hubuum_client.PrincipalMember

Bases: HubuumModel

Revision-owned membership between a principal and a group.

hubuum_client.MembershipPrincipal

Bases: HubuumModel

Principal details nested in a membership or current-user response.

hubuum_client.CurrentTokenMetadata

Bases: _TokenMetadataBase

Metadata for the token authenticating the current request.

hubuum_client.MeResponse

Bases: HubuumModel

hubuum_client.ClientConfig

Bases: HubuumModel

Public client-safe server configuration.

hubuum_client.ClientAuthenticationConfig

Bases: HubuumModel

Public authentication settings needed by API consumers.

hubuum_client.ClientPaginationConfig

Bases: HubuumModel

Effective pagination settings exposed by the server.

hubuum_client.AccessToken dataclass

Bearer token and optional authoritative expiry with a redacted representation.

Errors

hubuum_client.APIError dataclass

Bases: HubuumError

A non-successful Hubuum API response.

The access token and request body are intentionally never retained.

hubuum_client.TransportError dataclass

Bases: HubuumError

A request failed before a valid HTTP response was received.

hubuum_client.DecodeError dataclass

Bases: HubuumError

The server returned a successful response with an unexpected body.

hubuum_client.TaskUnsuccessfulError dataclass

Bases: HubuumError

A task reached a terminal state that does not represent full success.

Only the task ID and status are retained. In particular, the server's task summary is excluded because it can contain details derived from submitted data.

hubuum_client.PreconditionFailedError dataclass

Bases: APIError

A conditional mutation used a stale resource validator.

Credential approvals

hubuum_client.services.CredentialApprovalsService

Obtain single-use password approval and inspect retained evidence.

_client instance-attribute

_client = client

__init__

__init__(client)

create

create(payload)

get

get(approval_id)

hubuum_client.async_services.AsyncCredentialApprovalsService

Obtain single-use password approval and inspect retained evidence.

_client instance-attribute

_client = client

__init__

__init__(client)

create async

create(payload)

get async

get(approval_id)

hubuum_client.CredentialApprovalRequest

Bases: RequestModel

Authenticate the acting human for exactly one intended mutation.

model_validate_json classmethod

model_validate_json(json_data, **kwargs)

Validate JSON without retaining credentials in JSON-parser errors.

hubuum_client.CredentialApprovalResponse

Bases: HubuumModel

Transient approval; token expiry must be copied into the final mutation.

approval class-attribute instance-attribute

approval = Field(repr=False)

model_config class-attribute instance-attribute

model_config = ConfigDict(hide_input_in_errors=True)

record instance-attribute

record

token_expires_at class-attribute instance-attribute

token_expires_at = None

headers

headers()

Explicitly expose the approval header for one protected request.

token_request

token_request(payload)

Copy the server-normalized expiry without changing the original request.

hubuum_client.CredentialApprovalRecord

Bases: HubuumModel

Retained non-secret evidence, including consumption and invalidation.

hubuum_client.CredentialApprovalSecret

Bases: SecretStr

Single-use approval with redacted string, repr, and JSON serialization.

hubuum_client.CreateTokenOperation

Bases: RequestModel

hubuum_client.RenewTokenOperation

Bases: RequestModel

hubuum_client.CreateUserOperation

Bases: RequestModel

hubuum_client.UpdateUserOperation

Bases: RequestModel

hubuum_client.ImportCredentialsOperation

Bases: RequestModel

hubuum_client.ConfirmRestoreOperation

Bases: RequestModel

hubuum_client.RestoreConfirmRequest

Bases: RequestModel

Exact confirmation bound to a staged restore and its capability.

hubuum_client.ReauthenticationRequiredError dataclass

Bases: PermissionDeniedError

Obtain fresh, operation-bound password approval before retrying.

Task discovery

hubuum_client.TaskQuery dataclass

Bases: Query

Task discovery controls using plain server parameter names.

Inherited limit, sort, cursor, and include_total builders preserve these fields. Use the named fields below instead of generic where filters. Historical unknown facts remain distinct from known false values.

hubuum_client.RetainedImportDetails

Bases: HubuumModel

hubuum_client.RetainedExportDetails

Bases: HubuumModel

hubuum_client.RetainedBackupDetails

Bases: HubuumModel

hubuum_client.TaskOutputDiscoveryState

Bases: StrEnum

hubuum_client.SchemaTaskDetails

Bases: HubuumModel

hubuum_client.RebuildTaskDetails

Bases: HubuumModel

hubuum_client.RemoteCallTaskDetails

Bases: HubuumModel