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.
_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__}"
},
)
credential_approvals
cached
property
¶
Return operation-bound password approval and evidence operations.
is_authenticated
property
¶
Return whether the client currently holds an access token.
openapi
property
¶
Return the complete operation-ID interface for all 220 v0.0.16 operations.
metrics_at ¶
Return unauthenticated metrics text from an origin-locked custom path.
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
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 one origin-locked response without exposing request secrets.
hubuum_client.AsyncClient ¶
Async client with the same resource surface as :class:Client.
_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__}"
},
)
credential_approvals
cached
property
¶
Return operation-bound password approval and evidence operations.
is_authenticated
property
¶
Return whether the client currently holds an access token.
openapi
property
¶
Return the complete operation-ID interface for all 220 v0.0.16 operations.
_request_stream_response
async
¶
metrics_at
async
¶
Return unauthenticated metrics text from an origin-locked custom path.
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
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 one origin-locked response without exposing request secrets.
hubuum_client.ClientOptions
dataclass
¶
Connection behavior shared by synchronous and asynchronous clients.
hubuum_client.RequestOptions
dataclass
¶
Transport controls for one origin-locked request.
hubuum_client.OpenAPIOptions
dataclass
¶
Path, query, header, and response controls for an OpenAPI operation.
hubuum_client.OperationSpec ¶
hubuum_client.OpenAPIOperations ¶
Invoke every operation in Hubuum v0.0.16 by its stable OpenAPI operationId.
hubuum_client.AsyncOpenAPIOperations ¶
Asynchronous operation-ID interface for the complete v0.0.16 contract.
hubuum_client.ResponseStream ¶
A synchronous response body consumed inside Client.stream().
hubuum_client.AsyncResponseStream ¶
An asynchronous response body consumed inside AsyncClient.stream().
Task-backed services¶
hubuum_client.services.TasksService ¶
Inspect, paginate, and wait for asynchronous Hubuum tasks.
_service
instance-attribute
¶
all ¶
Collect visible tasks with explicit page and item safety bounds.
all_events ¶
Collect a task's events with explicit page and item bounds.
cancel ¶
Request cancellation; 202 means cleanup is pending, so use wait() for completion.
event_pages ¶
Iterate bounded cursor pages from a task's event history.
wait ¶
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.
_service
instance-attribute
¶
all
async
¶
Collect visible tasks with explicit page and item safety bounds.
all_events
async
¶
Collect a task's events with explicit page and item bounds.
cancel
async
¶
Request cancellation; 202 means cleanup is pending, so use wait() for completion.
event_pages
async
¶
Iterate bounded cursor pages from a task's event history.
events_page
async
¶
Return one cursor page from a task's event history.
wait
async
¶
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.
all_results ¶
Collect import outcomes with explicit page and item bounds.
result_pages ¶
Iterate bounded cursor pages of per-entity import outcomes.
results_page ¶
Return one cursor page of per-entity import outcomes.
run ¶
Submit, await, and collect all outcomes for one import task.
submit ¶
Submit an import task, optionally with a replay-safe idempotency key.
hubuum_client.async_services.AsyncImportsService ¶
Async import submission and per-entity outcome inspection.
all_results
async
¶
Collect import outcomes with explicit page and item bounds.
result_pages
async
¶
Iterate bounded cursor pages of per-entity import outcomes.
results
async
¶
Return one page of per-entity import outcomes as a list.
results_page
async
¶
Return one cursor page of per-entity import outcomes.
run
async
¶
Submit, await, and collect all outcomes for one import task.
submit
async
¶
Submit an import task, optionally with a replay-safe idempotency key.
hubuum_client.services.ExportsService ¶
hubuum_client.async_services.AsyncExportsService ¶
Async export submission and typed or rendered output retrieval.
Schema services¶
hubuum_client.services.ClassSchemaService ¶
Stage, inspect, and explicitly activate one class's schema revisions.
activate ¶
Activate with an explicit policy and expected active schema revision.
generate_report ¶
Generate and retain HTML from saved diagnostics.
objects ¶
Read authorized evidence; resume with next_after even after an empty page.
report ¶
Read retained HTML, optionally requesting an attachment response.
revalidate ¶
Queue revalidation of the active revision without changing object data.
hubuum_client.async_services.AsyncClassSchemaService ¶
Stage, inspect, and explicitly activate one class's schema revisions.
activate
async
¶
Activate with an explicit policy and expected active schema revision.
generate_report
async
¶
Generate and retain HTML from saved diagnostics.
objects
async
¶
Read authorized evidence; resume with next_after even after an empty page.
report
async
¶
Read retained HTML, optionally requesting an attachment response.
revalidate
async
¶
Queue revalidation of the active revision without changing object data.
revisions
async
¶
Read one bounded revision page; resume after its last revision.
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.
__init__ ¶
__init__(
filters=(),
limit_value=None,
cursor_value=None,
sort_value=None,
include_total_value=None,
)
hubuum_client.QueryFilter
dataclass
¶
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.
contains_ip ¶
Match a stored network strictly containing the host IP value.
contains_network ¶
Match a stored network containing value.
has_key ¶
Match an object containing key, including a JSON-null value.
icontains ¶
Match a textual value containing value case-insensitively.
iends_with ¶
Match a textual value ending with value case-insensitively.
istarts_with ¶
Match a textual value starting with value case-insensitively.
overlaps_network ¶
Match a stored IP/network overlapping value.
hubuum_client.FilterOperator ¶
hubuum_client.Page
dataclass
¶
hubuum_client.TokenListState ¶
Bases: StrEnum
Retained-token lifecycle subset selected by token list operations.
Core models¶
hubuum_client.Collection ¶
Bases: HubuumModel
hubuum_client.HubuumClass ¶
Bases: HubuumModel
normalize_runtime_collection
classmethod
¶
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.
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 ¶
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.
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.
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.
hubuum_client.ImportTaskResult ¶
Bases: HubuumModel
Outcome for one entity processed by an import task.
hubuum_client.ImportRunResult
dataclass
¶
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 ¶
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 ¶
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
¶
Credential approvals¶
hubuum_client.services.CredentialApprovalsService ¶
hubuum_client.async_services.AsyncCredentialApprovalsService ¶
hubuum_client.CredentialApprovalRequest ¶
Bases: RequestModel
Authenticate the acting human for exactly one intended mutation.
model_validate_json
classmethod
¶
Validate JSON without retaining credentials in JSON-parser errors.
hubuum_client.CredentialApprovalResponse ¶
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