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

Constructor: _WorkerTarget(app)

View In Hierarchy

Forward HTTP connections and track the embedded worker's lifespan.

Method __call__ Forward ASGI traffic and observe acknowledgements on lifespan scopes.
Method __init__ Retain the application and track when its worker can accept a stop.
Method __rsgi__ Delegate an RSGI connection to the application.
Method __rsgi_init__ Mark the RSGI worker ready to receive Granian's stop notification.
Instance Variable app Application that handles HTTP connections and lifespan events.
Instance Variable failure Failure acknowledged through the ASGI lifespan protocol.
Instance Variable ready Signal that startup has completed and Granian can stop the worker.
def __call__(self, scope: dict, receive: Callable, send: Callable) -> Awaitable[object]: (source)

Forward ASGI traffic and observe acknowledgements on lifespan scopes.

Parameters
scope:dictASGI connection or lifespan scope.
receive:CallableCoroutine that receives messages from Granian.
send:CallableCoroutine that sends messages to Granian.
Returns
Awaitable[object]Application handler for the scope.
def __init__(self, app: IApplication): (source)

Retain the application and track when its worker can accept a stop.

Parameters
app:IApplicationCreated application for this worker.
Returns
NoneStore the application and initialize its readiness and failure state.
def __rsgi__(self, scope: object, protocol: object) -> Awaitable[object]: (source)

Delegate an RSGI connection to the application.

Parameters
scope:objectGranian connection scope.
protocol:objectGranian transport for the connection.
Returns
Awaitable[object]Application handler for this connection.
def __rsgi_init__(self, loop: asyncio.AbstractEventLoop): (source)

Mark the RSGI worker ready to receive Granian's stop notification.

Parameters
loop:asyncio.AbstractEventLoopEvent loop supplied by the RSGI protocol.
Returns
NoneSignal that Granian can receive a stop request.

Application that handles HTTP connections and lifespan events.

Failure acknowledged through the ASGI lifespan protocol.

Signal that startup has completed and Granian can stop the worker.