ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

Own an error-only ledger for one execution and its nested boundaries.

Method __enter__ Bind this operation to the current context.
Method __exit__ Restore the parent context and release this operation's ledger.
Method __init__ Initialize operation metadata and select its ledger owner.
Method _owner Return the nearest operation that owns the shared incident ledger.
Method _propagate Transfer escaping incidents to the parent operation.
Method adopt Add an incident to the live ledger owner.
Method incident Find the recorded incident for an exception by object identity.
Method lookup Find a receipt for an exception or an entirely observed group.
Class Variable __slots__ Bounded operation state with lazy allocation of its incident ledger.
Instance Variable closed Whether this boundary has released its incident references.
Instance Variable correlation_id Correlation identifier allocated lazily when an incident occurs.
Instance Variable flow Execution flow used to enrich incident metadata.
Instance Variable ledger Incident identity registry, allocated only after a failure.
Instance Variable name Logical operation name supplied by its owner.
Instance Variable owns Whether this boundary owns and releases an independent ledger.
Instance Variable parent Live enclosing operation belonging to the same runtime, if any.
Instance Variable runtime Application coordinator associated with this execution boundary.
Instance Variable token Context-variable token restored when this boundary exits.
def __enter__(self) -> Self: (source)

Bind this operation to the current context.

Returns
typing.SelfThis operation, with the previous context retained for restoration.
def __exit__(self, exc_type: object, error: BaseException | None, traceback: object): (source)

Restore the parent context and release this operation's ledger.

Parameters
exc_type:objectException type supplied by the context manager protocol; unused.
error:BaseException or NoneException leaving the block, if any.
traceback:objectTraceback supplied by the context manager protocol; unused.
Returns
NoneNo return value.
def __init__(self, runtime: FailureRuntime | None, flow: str, name: str | None, correlation_id: str | None, *, isolated: bool, parent: _Operation | None): (source)

Initialize operation metadata and select its ledger owner.

Parameters
runtime:FailureRuntime or NoneRuntime associated with this execution, if available.
flow:strExecution-flow label.
name:str or NoneLogical operation name.
correlation_id:str or NoneCorrelation identifier supplied by the execution owner.
isolated:boolOwn a separate ledger even when a compatible parent exists.
parent:_Operation or NoneEnclosing operation; ignore closed parents or a different runtime.
Returns
NoneNo return value.
def _owner(self) -> _Operation: (source)

Return the nearest operation that owns the shared incident ledger.

Returns
_OperationThis operation or its nearest ledger-owning ancestor.
def _propagate(self, error: BaseException): (source)

Transfer escaping incidents to the parent operation.

Parameters
error:BaseExceptionException or exception group leaving the owned operation.
Returns
NoneNo return value.
def adopt(self, incident: _Incident): (source)

Add an incident to the live ledger owner.

Parameters
incident:_IncidentDelivery record to retain by original exception identity.
Returns
NoneNo return value.
def incident(self, error: BaseException) -> _Incident | None: (source)

Find the recorded incident for an exception by object identity.

Parameters
error:BaseExceptionOriginal exception to locate in the owner ledger.
Returns
_Incident or NoneMatching incident from a live owner ledger, or None if absent.
def lookup(self, error: BaseException) -> FailureReceipt | None: (source)

Find a receipt for an exception or an entirely observed group.

Parameters
error:BaseExceptionException or exception group whose observation status is needed.
Returns
FailureReceipt or NoneDirect receipt, or the first child receipt when every group member has been observed; None otherwise.
__slots__: tuple[str, ...] = (source)

Bounded operation state with lazy allocation of its incident ledger.

Whether this boundary has released its incident references.

correlation_id = (source)

Correlation identifier allocated lazily when an incident occurs.

Execution flow used to enrich incident metadata.

Incident identity registry, allocated only after a failure.

Logical operation name supplied by its owner.

Whether this boundary owns and releases an independent ledger.

Live enclosing operation belonging to the same runtime, if any.

Application coordinator associated with this execution boundary.

Context-variable token restored when this boundary exits.