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
Undocumented
| Async Function | _asgi |
Consume ASGI receive messages and dispatch them concurrently. |
| Async Function | _await |
Await the kernel and finish its disconnect monitor before returning. |
| Function | _create |
Start a monitored handler through the event loop's task factory. |
| Function | _parse |
Parse a dot-notated configuration key into immutable path components. |
| Async Function | _rsgi |
Cancel the kernel task when the RSGI disconnect awaitable completes. |
| Constant | _ASGI |
Undocumented |
| Constant | _CONFIG |
Undocumented |
| Constant | _CWD |
Undocumented |
| Constant | _ERR |
Undocumented |
| Constant | _MAINTENANCE |
Undocumented |
| Constant | _ROUTER |
Undocumented |
| Constant | _SENTINEL |
Undocumented |
async def _asgi_receive_dispatcher(receive:
Callable[ [], Awaitable[ dict[ str, Any]]], request_queue: asyncio.Queue, handler_task: asyncio.Task) -> bool:
(source)
¶
Consume ASGI receive messages and dispatch them concurrently.
Forward body chunks through a bounded queue and cancel the handler when the receive channel reports a disconnect or fails. A full queue pauses receive calls until the handler consumes a buffered message.
| Parameters | |
receive:Callable[[], Awaitable[dict[str, Any]]] | ASGI receive callable provided by the server. |
requestasyncio.Queue | Queue that buffers body messages for the handler. |
handlerasyncio.Task | Kernel task to cancel when the receive channel closes. |
| Returns | |
bool | Whether the disconnect requested cancellation of the handler. |
async def _await_http_tasks(handler_task:
asyncio.Task, disconnect_task: asyncio.Task[ bool]) -> Any:
(source)
¶
Await the kernel and finish its disconnect monitor before returning.
| Parameters | |
handlerasyncio.Task | Kernel task handling the request. |
disconnectasyncio.Task[bool] | Monitor returning whether it cancelled the kernel on disconnect. |
| Returns | |
Any | Kernel result, or None after a client disconnect. |
| Raises | |
asyncio.CancelledError | If the caller or kernel is cancelled independently of a disconnect. |
Exception | If the kernel or disconnect monitor fails. |
def _create_http_handler_task(loop:
asyncio.AbstractEventLoop, coroutine: Coroutine) -> asyncio.Task:
(source)
¶
Start a monitored handler through the event loop's task factory.
| Parameters | |
loop:asyncio.AbstractEventLoop | Running request event loop. |
coroutine:Coroutine | Kernel handler coroutine to schedule. |
| Returns | |
asyncio.Task | Handler task. The native loop without a custom factory starts it eagerly; other loops and factories receive their standard task-creation arguments. |
async def _rsgi_disconnect_watcher(protocol:
HTTPProtocol, handler_task: asyncio.Task) -> bool:
(source)
¶
Cancel the kernel task when the RSGI disconnect awaitable completes.
| Parameters | |
protocol:HTTPProtocol | Protocol providing the client disconnect awaitable. |
handlerasyncio.Task | Kernel task associated with the connection. |
| Returns | |
bool | Whether the disconnect requested cancellation of the handler. |