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.

module documentation

Provide mcp operations through AsyncClosable, OwnedStream.

Class AsyncClosable Describe the awaited close operation of an owned asynchronous source.
Class OwnedStream Join source cleanup before propagating delivery errors or cancellation.
Function _caller_cancelled Identify new caller cancellation while an owned cleanup was awaited.
Function _create_task Close an owned coroutine when the loop refuses to schedule it.
def _caller_cancelled(error: BaseException, cancellations: int) -> bool: (source)

Identify new caller cancellation while an owned cleanup was awaited.

Parameters
error:BaseExceptionOutcome of joining cleanup, which may itself have been cancelled.
cancellations:intCaller cancellation count recorded before the owned operation.
Returns
boolWhether the outcome carries a new cancellation request for this caller.
def _create_task(coroutine: Coroutine[object, object, T], *, name: str | None = None) -> asyncio.Task[T]: (source)

Close an owned coroutine when the loop refuses to schedule it.

Parameters
coroutine:collections.abc.Coroutine[object, object, T]Operation whose ownership is transferred only after successful admission.
name:str | None, optionalDiagnostic task name.
Returns
asyncio.Task[T]Task owning the admitted coroutine.
Raises
BaseExceptionIf task creation fails, after closing the unowned coroutine.