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

Own HTTP work on the event loop that admitted it.

Overlapping application lifetimes can share the same pool until its final owner exits.

Class _Generation Share a pool among overlapping application lifetimes.
Class _LoopState Limit admission across owned generations and temporary transports.
Class _Owner Bind tasks to an HTTP, CLI or headless lifetime.
Class _PoolBudget Account for open pools including idle keep-alive and in-progress closes.
Class _TransportSlot Publish one successfully initialized transport, including on cancellation.
Class HttpRuntime Index independent transport lifetimes for one application.
Class Reservation Hold active or pending capacity while preparing and sending a request.
Function _after_fork Discard a registry lock possibly held by a vanished parent thread.
Async Function _finally Preserve the operation's exception when its finalizer also fails.
Function _task Release rejected work and still schedule mandatory resource finalizers.
Async Function complete_cleanup Finish releasing a resource despite caller cancellation or factory rejection.
Function runtime_for Find the registry shared by the application's manager and entry points.
Constant _CLOSED Report an exchange rejected after the end of its lifecycle.
Constant _FULL Report an exchange rejected when all pending slots are occupied.
Constant _GRACE_SECONDS Limit the time in seconds to wait for outstanding sends before cancellation.
Constant _UNBOUND Distinguish an unbound context from an explicit dispatch without a worker.
Type Alias Accessor Obtain the transport allocated to an admitted exchange.
Type Alias Factory Create a transport asynchronously on its owning loop.
Type Alias Kind Identify the application lifecycle that owns outbound HTTP work.
Variable _index_lock Serialize application registry creation and event-loop index access.
def _after_fork(): (source)

Discard a registry lock possibly held by a vanished parent thread.

Returns
NoneLeave the child process with its own unlocked registry guard.
async def _finally(cleanup: Callable[[], Awaitable[None]]) -> AsyncGenerator[None]: (source)

Preserve the operation's exception when its finalizer also fails.

Parameters
cleanup:Callable[[], Awaitable[None]]Asynchronous finalizer executed on every exit.
Yields
NoneRun the protected operation before invoking its finalizer.
def _task(work: Coroutine[object, object, T], *, cleanup: bool = False) -> asyncio.Task[T]: (source)

Release rejected work and still schedule mandatory resource finalizers.

Parameters
work:CoroutineCoroutine whose result and exceptions are forwarded by the task.
cleanup:boolWhether a rejected task factory must still schedule cleanup.
Returns
asyncio.TaskScheduled task on the running loop.
async def complete_cleanup(work: Coroutine[object, object, None]): (source)

Finish releasing a resource despite caller cancellation or factory rejection.

Parameters
work:Coroutine[object, object, None]Coroutine owned by this resource operation.
Returns
NoneReturn after the supplied cleanup coroutine has completed.
def runtime_for(app: object) -> HttpRuntime: (source)

Find the registry shared by the application's manager and entry points.

Parameters
app:objectApplication that owns configuration and runtime state.
Returns
HttpRuntimeApplication registry for outbound connections.

Report an exchange rejected after the end of its lifecycle.

Value
'The HTTP runtime has closed.'

Report an exchange rejected when all pending slots are occupied.

Value
'Outbound HTTP capacity is exhausted.'
_GRACE_SECONDS: float = (source)

Limit the time in seconds to wait for outstanding sends before cancellation.

Value
5.0
_UNBOUND = (source)

Distinguish an unbound context from an explicit dispatch without a worker.

Value
object()

Obtain the transport allocated to an admitted exchange.

Value
Callable[[Factory], Awaitable[IHttpTransport]]

Create a transport asynchronously on its owning loop.

Value
Callable[[], Awaitable[IHttpTransport]]

Identify the application lifecycle that owns outbound HTTP work.

Value
Literal['http', 'cli', 'headless']
_index_lock = (source)

Serialize application registry creation and event-loop index access.