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

Adapt an ASGI scope dictionary to the transport adapter contract.

Returns
NoneThis class exposes request data accessors and state overrides.
Method __buildHeadersASGI Build a Headers object from ASGI raw headers.
Method __contains__ Check whether an override key exists.
Method __delitem__ Delete an override value by key.
Method __getitem__ Get a cached override value by key.
Method __init__ Initialize the adapter with an ASGI scope dictionary.
Method __setitem__ Set a cached override value by key.
Method client Get the remote client IP from the ASGI scope.
Method getScope Get the adjusted ASGI scope dictionary.
Method headers Get request headers.
Method method Get the HTTP method.
Method path Get the request path.
Method scheme Get the URL scheme.
Method setClient Set the remote client address.
Method setScheme Set the URL scheme.
Method setState Set an arbitrary override state value.
Method wantsJson Determine whether the client prefers JSON.
Class Variable __slots__ Undocumented
Instance Variable __client Undocumented
Instance Variable __headers Undocumented
Instance Variable __overrides Undocumented
Instance Variable __scope Undocumented
Instance Variable __wants_json Undocumented
def __buildHeadersASGI(self) -> Headers: (source)

Build a Headers object from ASGI raw headers.

Returns
HeadersReturn decoded and indexed request headers.
def __contains__(self, key: str) -> bool: (source)

Check whether an override key exists.

Parameters
key:strSpecify the override key.
Returns
boolReturn True when the key exists, else False.
def __delitem__(self, key: str): (source)

Delete an override value by key.

Parameters
key:strSpecify the override key.
Returns
NoneReturn None.
def __getitem__(self, key: str) -> object | None: (source)

Get a cached override value by key.

Parameters
key:strSpecify the override key.
Returns
object | NoneReturn the stored value, or None when absent.
def __init__(self, scope: dict): (source)

Initialize the adapter with an ASGI scope dictionary.

Parameters
scope:dictProvide the ASGI scope mapping.
Returns
NoneReturn None.
def __setitem__(self, key: str, value: object): (source)

Set a cached override value by key.

Parameters
key:strSpecify the override key.
value:objectProvide the value to store.
Returns
NoneReturn None.
def client(self) -> str | None: (source)

Get the remote client IP from the ASGI scope.

Returns
str | NoneReturn the client IP, or None when unavailable.
def getScope(self) -> dict: (source)

Get the adjusted ASGI scope dictionary.

Returns
dictReturn original scope merged with overrides.
def headers(self) -> Headers: (source)

Get request headers.

Returns
HeadersReturn the prebuilt Headers instance.
def method(self) -> str | None: (source)

Get the HTTP method.

Returns
str | NoneReturn the HTTP method, or None when missing.
def path(self) -> str | None: (source)

Get the request path.

Returns
str | NoneReturn the request path, or None when missing.
def scheme(self) -> str | None: (source)

Get the URL scheme.

Returns
str | NoneReturn the scheme, or None when missing.
def setClient(self, ip: str): (source)

Set the remote client address.

Parameters
ip:strProvide the client IP value.
Returns
NoneReturn None.
def setScheme(self, value: str): (source)

Set the URL scheme.

Parameters
value:strProvide the scheme, such as "http" or "https".
Returns
NoneReturn None.
def setState(self, key: str, value: Any): (source)

Set an arbitrary override state value.

Parameters
key:strSpecify the key to set.
value:AnyProvide the value to store.
Returns
NoneReturn None.
def wantsJson(self) -> bool: (source)

Determine whether the client prefers JSON.

Returns
boolReturn True when Accept includes JSON media types.
__client: Any = (source)

Undocumented

Undocumented

__overrides: dict[str, Any] = (source)

Undocumented

Undocumented

__wants_json: Any = (source)

Undocumented