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.

package documentation

Undocumented

Module context Undocumented
Module functions No module docstring; 0/1 constant, 1/1 function documented

From __init__.py:

Class AuthenticationContext Hold the authenticated state of one request.
Function bind_auth_context Bind an authentication context to the current scope.
Function current_auth_context Return the authentication context bound to the current scope.
Constant GUEST_CONTEXT Undocumented
def bind_auth_context(context: IAuthenticationContext): (source)

Bind an authentication context to the current scope.

Parameters
context:IAuthenticationContextContext resolved for the running request.
Returns
NoneThe scope is updated as a side effect.
Raises
AuthExceptionWhen no container scope is active, which means the caller is not inside a request and has nowhere to store the context.
def current_auth_context() -> IAuthenticationContext: (source)

Return the authentication context bound to the current scope.

The context lives in the container scope the HTTP kernel opens for every request, which is backed by contextvars. Code running outside a request, such as a console command, always sees the shared guest context.

Returns
IAuthenticationContextContext of the running request, or the shared guest context when no scope is active or nothing was bound yet.