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

class FailureHandling: (source)

View In Hierarchy

Own logging and optional presentation for one observed incident.

The runtime completes logging after the application hook returns. The protocol owner may then request presentation with its live request. Keep this object local to the operation; immutable receipts contain only status.

Async Method complete Execute the deferred logging action at most once.
Async Method present Execute deferred presentation at most once and cache its result.
Class Variable _completion_error Retained logging failure preventing automatic effect retries.
Class Variable _completion_lock Coordinate consumers of the single logging effect.
Class Variable _completion_traceback Original logging traceback, without frames added by subsequent callers.
Class Variable _presentation_diagnosed Whether the coordinator already emitted the presentation diagnostic.
Class Variable _presentation_error Retained presentation failure preventing automatic effect retries.
Class Variable _presentation_lock Coordinate consumers of the single presentation effect.
Class Variable _presentation_traceback Original presentation traceback, restored for repeated failed requests.
Class Variable degraded Whether an effect required fallback or failed during handling.
Class Variable logging Deferred asynchronous logging action owned by the coordinator.
Class Variable presentation Deferred presentation accepting the owner's flow and live request.
Instance Variable _completed Whether logging execution has already been claimed.
Instance Variable _completion_owner Task executing logging, cleared when the action finishes or fails.
Instance Variable _presentation_owner Task executing presentation, cleared when the action finishes or fails.
Instance Variable _presented Whether presentation execution has already been claimed.
Instance Variable _result Cached presentation outcome shared with concurrent consumers.
Instance Variable reported Whether the logging action completed successfully.
async def complete(self): (source)

Execute the deferred logging action at most once.

Serialize concurrent calls and preserve failures for later callers. Restore the original traceback before re-raising a retained error so repeated callers do not accumulate one another's stack frames. Set reported after successful logging; skip logging if no action is configured or a previous call completed successfully.

Returns
NoneNo return value.
Raises
RuntimeErrorIf the logging action recursively waits for its own completion.
BaseExceptionIf execution is cancelled, logging fails, or a retained failure is re-raised.
async def present(self, *, flow: str, request: object | None = None) -> object: (source)

Execute deferred presentation at most once and cache its result.

Serialize concurrent calls and preserve failures for later callers. Retained errors keep their identity, cause, and original traceback without accumulating the frames of previous consumers.

Parameters
flow:strExecution flow passed to the presentation callback.
request:object or None, optionalLive request or execution state passed to the callback, when available.
Returns
objectCached presentation result, or None if no callback is configured.
Raises
RuntimeErrorIf presentation recursively waits for its own result.
BaseExceptionIf execution is cancelled, presentation fails, or a retained failure is re-raised.
_completion_error: BaseException | None = (source)

Retained logging failure preventing automatic effect retries.

_completion_lock: asyncio.Lock = (source)

Coordinate consumers of the single logging effect.

_completion_traceback: TracebackType | None = (source)

Original logging traceback, without frames added by subsequent callers.

_presentation_diagnosed: bool = (source)

Whether the coordinator already emitted the presentation diagnostic.

_presentation_error: BaseException | None = (source)

Retained presentation failure preventing automatic effect retries.

_presentation_lock: asyncio.Lock = (source)

Coordinate consumers of the single presentation effect.

_presentation_traceback: TracebackType | None = (source)

Original presentation traceback, restored for repeated failed requests.

degraded: bool = (source)

Whether an effect required fallback or failed during handling.

logging: Callable[[], Awaitable[object]] | None = (source)

Deferred asynchronous logging action owned by the coordinator.

presentation: Callable[..., Awaitable[object]] | None = (source)

Deferred presentation accepting the owner's flow and live request.

_completed: bool = (source)

Whether logging execution has already been claimed.

_completion_owner: asyncio.Task | None = (source)

Task executing logging, cleared when the action finishes or fails.

_presentation_owner: asyncio.Task | None = (source)

Task executing presentation, cleared when the action finishes or fails.

_presented: bool = (source)

Whether presentation execution has already been claimed.

Cached presentation outcome shared with concurrent consumers.

reported: bool = (source)

Whether the logging action completed successfully.