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

Reject every incoming request with 503 while in maintenance mode.

The response format (HTML or JSON) is selected by inspecting the Accept header of the incoming request via adapter.wantsJson().

Method __init__ Initialize with the maintenance flag and default response handler.
Async Method handle Return a 503 response if the application is under maintenance.
Class Variable __slots__ Undocumented
Instance Variable __default_responses Undocumented
Instance Variable __under_maintenance Undocumented
def __init__(self, *, under_maintenance: bool, default_responses: IDefaultResponses): (source)

Initialize with the maintenance flag and default response handler.

Parameters
under_maintenance:boolTrue when the application is in maintenance mode.
default_responses:IDefaultResponsesHandler used to build the 503 response.
Returns
NoneUndocumented
async def handle(self, adapter: TransportAdapter, *, under_maintenance: bool | None = None) -> Response | None: (source)

Return a 503 response if the application is under maintenance.

Parameters
adapter:TransportAdapterTransport adapter providing header access and client-preference detection via wantsJson().
under_maintenance:bool | None, optionalCurrent application state; uses the constructor value when omitted.
Returns
Response | NoneA 503 response when the application is in maintenance mode, None otherwise.
__slots__: tuple[str, ...] = (source)

Undocumented

__default_responses: IDefaultResponses = (source)

Undocumented

__under_maintenance: bool = (source)

Undocumented