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

Group the http components and public imports.

Package adapters Group the http adapters components and public imports.
Package base Group the http base components and public imports.
Package contracts Group the http contracts components and public imports.
Package default Group the http default components and public imports.
Package enums Group the http enums components and public imports.
Package exceptions Group the http exceptions components and public imports.
Module factory Build every kind of HTTP response from a single entry-point.
Module kernel Serve concurrent requests within one worker event loop.
Package layer Group the http layer components and public imports.
Module middleware Base class for HTTP middleware implementations.
Package payload Group the http payload components and public imports.
Module request Provide http operations through UnsupportedMediaTypeException, Request.
Module responses Provide http operations.
Package routes Group the http routes components and public imports.
Module sse Represent one immutable UTF-8 server-sent event.
Module types Define types for http.
Module validation Provide http operations through validation_response, previous_url.
Module websocket Own one server-independent connection with direct awaited messaging.
Module websocket_message Provide http operations.
Module websocket_middleware Define a connection middleware resolved inside each WebSocket scope.

From __init__.py:

Class BaseMiddleware Base class for HTTP middleware implementations.
Class EventStreamResponse Stream typed server-sent events through the existing response transport.
Class FileResponse Serve a filesystem resource through an HTTP response.
Class HTMLResponse Render an HTML response with the corresponding content type.
Class JSONResponse Encode a JSON response while preserving response metadata.
Class PlainTextResponse Return a plain-text HTTP response.
Class RedirectResponse Return an HTTP redirect to the configured location.
Class Request Expose HTTP request metadata, input, authentication and session state.
Class Response Represent an HTTP response with status, headers, cookies and body.
Class ResponseFactory Build every kind of HTTP response from a single entry-point.
Class ResponseTemplate Store validated immutable content for independent response instances.
Class ServerSentEvent Represent one immutable UTF-8 server-sent event.
Class StreamingResponse Stream response chunks without buffering the complete body.
Class WebSocket Own one server-independent connection with direct awaited messaging.
Class WebSocketMessage Retain an immutable message without copying its payload.
Class WebSocketMessageType Identify a normalized complete WebSocket message.
Class WebSocketMiddleware Define a connection middleware resolved inside each WebSocket scope.
Class WebSocketState Describe the connection lifecycle independently of its server.
Exception WebSocketDisconnected Report a terminal connection failure with available close details.
Function __dir__ List loaded attributes and declared public exports.
Function __getattr__ Resolve and cache a public package export.
Constant _EXPORTS Public export names mapped to their defining modules and attributes.
Constant _WEBSOCKET_MESSAGE_MODULE Module path used to resolve the public WebSocket message exports.
Type Alias HttpResponse Every object built by the response factory derives from Response, so this single alias annotates any handler regardless of its content type.
Type Alias NextCallable No-arg async callable that advances to the next middleware layer.
Type Alias WebSocketNext Type alias for Callable[[], Awaitable[None]].
Variable response Stateless factory shared by every controller; safe to import directly.
def __dir__() -> list[str]: (source)

List loaded attributes and declared public exports.

Returns
list[str]Sorted attribute names available on this package.
def __getattr__(name: str) -> object: (source)

Resolve and cache a public package export.

Parameters
name:strPublic attribute requested from this package.
Returns
objectExported object from its defining module.
Raises
AttributeErrorIf the requested attribute is not exported.
_EXPORTS = (source)

Public export names mapped to their defining modules and attributes.

Value
{'BaseMiddleware': ('orionis.http.middleware', 'BaseMiddleware'),
 'EventStreamResponse': ('orionis.http.responses', 'EventStreamResponse'),
 'FileResponse': ('orionis.http.responses', 'FileResponse'),
 'HTMLResponse': ('orionis.http.responses', 'HTMLResponse'),
 'HttpResponse': ('orionis.http.types', 'HttpResponse'),
 'JSONResponse': ('orionis.http.responses', 'JSONResponse'),
 'NextCallable': ('orionis.http.middleware', 'NextCallable'),
...
_WEBSOCKET_MESSAGE_MODULE: str = (source)

Module path used to resolve the public WebSocket message exports.

Value
'orionis.http.websocket_message'

Every object built by the response factory derives from Response, so this single alias annotates any handler regardless of its content type.

Value
Response
NextCallable = (source)

No-arg async callable that advances to the next middleware layer.

Value
Callable[[], Awaitable[Response]]

Type alias for Callable[[], Awaitable[None]].

Value
Callable[[], Awaitable[None]]

Stateless factory shared by every controller; safe to import directly.