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 StartSessionMiddleware(BaseMiddleware): (source)

Constructor: StartSessionMiddleware(manager, catch)

View In Hierarchy

Undocumented

Static Method __storeCurrentUrl Record the current URL as the page to redirect back to.
Method __init__ Initialise the middleware with the given session manager.
Async Method __response Render failures while the session is still available for persistence.
Async Method handle Process the request through the session lifecycle.
Class Variable __slots__ Undocumented
Instance Variable _catch Undocumented
Instance Variable _manager Undocumented
Instance Variable _track_previous_url Undocumented
def __storeCurrentUrl(request: Request, response: Response, session: ISession): (source)

Record the current URL as the page to redirect back to.

Only GET/HEAD responses with status 200-299 are stored, excluding AJAX and requests that want JSON. Other statuses, background calls and form submissions never overwrite the previous page.

Parameters
request:RequestIncoming HTTP request.
response:ResponseOutgoing HTTP response.
session:ISessionActive session for this request.
Returns
NoneUndocumented
def __init__(self, manager: SessionManager, catch: ICatch): (source)

Initialise the middleware with the given session manager.

Parameters
manager:SessionManagerSession manager used for the start / save cycle.
catch:ICatchFramework exception handler producing responses before persistence.
Returns
NoneUndocumented
async def __response(self, request: Request, call_next: Callable[[], Awaitable[Response]]) -> Response: (source)

Render failures while the session is still available for persistence.

Parameters
request:RequestIncoming request.
call_next:Callable[[], Awaitable[Response]]Remaining middleware and controller pipeline.
Returns
ResponseNormal response or the framework's exception response.
async def handle(self, request: Request, call_next: Callable[[], Awaitable[Response]]) -> Response: (source)

Process the request through the session lifecycle.

Parameters
request:RequestIncoming HTTP request.
call_next:Callable[[], Awaitable[Response]]No-arg async callable that advances to the next middleware or final route handler.
Returns
ResponseThe outgoing HTTP response, optionally augmented with a Set-Cookie header when the session was used.
__slots__: tuple[str, ...] = (source)

Undocumented

Undocumented

_manager = (source)

Undocumented

_track_previous_url = (source)

Undocumented