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

Store validated immutable content for independent response instances.

Parameters
contentConstant response content, encoded once as UTF-8.
status_codeHTTP status shared by newly created responses.
headersConstant headers copied and encoded when the template is constructed.
media_typeResponse media type metadata.
Method __init__ Validate and snapshot constant response content and headers.
Method make Create a response with independent headers, cookies, and background.
Class Variable _headers Undocumented
Class Variable _raw_headers Undocumented
Class Variable body Undocumented
Class Variable media_type Undocumented
Class Variable status_code Undocumented
def __init__(self, content: bytes | str = b'', status_code: int = 200, headers: Mapping[str, str] | None = None, media_type: str | None = None): (source)

Validate and snapshot constant response content and headers.

Parameters
content:bytes | str, optionalConstant content to encode once.
status_code:int, optionalValid HTTP response status.
headers:Mapping[str, str] | None, optionalConstant headers copied from the caller's mapping.
media_type:str | None, optionalMedia type metadata copied to each response.
Returns
NoneThe immutable template is initialized.
Raises
TypeErrorIf the content is not text or bytes, or headers are not strings.
def make(self) -> Response: (source)

Create a response with independent headers, cookies, and background.

Returns
ResponseMutable response sharing only immutable body and encoded headers.
_headers: tuple[tuple[str, str], ...] = (source)

Undocumented

_raw_headers: tuple[tuple[bytes, bytes], ...] = (source)

Undocumented

Undocumented

media_type: str | None, optional = (source)

Undocumented

status_code: int, optional = (source)

Undocumented