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
class _Operation: (source)
Constructor: _Operation(runtime, flow, name, correlation_id, ...)
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 |
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. |
Bind this operation to the current context.
| Returns | |
typing.Self | This operation, with the previous context retained for restoration. |
Restore the parent context and release this operation's ledger.
| Parameters | |
excobject | Exception type supplied by the context manager protocol; unused. |
error:BaseException or None | Exception leaving the block, if any. |
traceback:object | Traceback supplied by the context manager protocol; unused. |
| Returns | |
None | No 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 None | Runtime associated with this execution, if available. |
flow:str | Execution-flow label. |
name:str or None | Logical operation name. |
correlationstr or None | Correlation identifier supplied by the execution owner. |
isolated:bool | Own a separate ledger even when a compatible parent exists. |
parent:_Operation or None | Enclosing operation; ignore closed parents or a different runtime. |
| Returns | |
None | No return value. |
Return the nearest operation that owns the shared incident ledger.
| Returns | |
_Operation | This operation or its nearest ledger-owning ancestor. |
Transfer escaping incidents to the parent operation.
| Parameters | |
error:BaseException | Exception or exception group leaving the owned operation. |
| Returns | |
None | No return value. |
Find the recorded incident for an exception by object identity.
| Parameters | |
error:BaseException | Original exception to locate in the owner ledger. |
| Returns | |
_Incident or None | Matching incident from a live owner ledger, or None if absent. |
Find a receipt for an exception or an entirely observed group.
| Parameters | |
error:BaseException | Exception or exception group whose observation status is needed. |
| Returns | |
FailureReceipt or None | Direct receipt, or the first child receipt when every group member has been observed; None otherwise. |