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

Undocumented

Method __contains__ Check if a cookie key exists in the container.
Method __getitem__ Retrieve the value of a cookie by key using the indexing operator.
Method __init__ Initialize the Cookies object by parsing the Cookie header.
Method __iter__ Iterate over the cookie container's key-value pairs.
Method __len__ Return the number of cookies in the container.
Method __repr__ Return the string representation of the Cookies object.
Method get Retrieve the value of a cookie by key.
Method getAll Return a copy of all cookies as a dictionary.
Method items Return a view of the cookie container's items.
Method keys Return a view of the cookie container's keys.
Method values Return a view of the cookie container's values.
Class Variable __slots__ Undocumented
Instance Variable _data Undocumented
def __contains__(self, key: str) -> bool: (source)

Check if a cookie key exists in the container.

Parameters
key:strThe name of the cookie to check.
Returns
boolTrue if the key exists, False otherwise.
def __getitem__(self, key: str) -> str: (source)

Retrieve the value of a cookie by key using the indexing operator.

Parameters
key:strThe name of the cookie to retrieve.
Returns
strThe value of the cookie associated with the given key.
Raises
KeyErrorIf the key is not found in the cookie data.
def __init__(self, cookie_header: str | None): (source)

Initialize the Cookies object by parsing the Cookie header.

Parameters
cookie_header:str | NoneThe raw Cookie header string to parse.
Returns
NoneThis method does not return a value.
def __iter__(self) -> Iterator[tuple[str, str]]: (source)

Iterate over the cookie container's key-value pairs.

Returns
Iterator[tuple[str, str]]An iterator over the cookie's key-value pairs.
def __len__(self) -> int: (source)

Return the number of cookies in the container.

Returns
intThe number of cookie key-value pairs.
def __repr__(self) -> str: (source)

Return the string representation of the Cookies object.

Returns
strThe string representation of the Cookies object.
def get(self, key: str, default: str | None = None) -> str | None: (source)

Retrieve the value of a cookie by key.

Parameters
key:strThe name of the cookie to retrieve.
default:str | None, optionalThe value to return if the key is not found (default is None).
Returns
str | NoneThe value of the cookie if found, otherwise the default value.
def getAll(self) -> dict[str, str]: (source)

Return a copy of all cookies as a dictionary.

Returns
dict[str, str]A dictionary containing all cookie key-value pairs.
def items(self) -> ItemsView[str, str]: (source)

Return a view of the cookie container's items.

Returns
ItemsView[str, str]A view object displaying the cookie's key-value pairs.
def keys(self) -> KeysView[str]: (source)

Return a view of the cookie container's keys.

Returns
KeysView[str]A view object displaying the cookie's keys.
def values(self) -> ValuesView[str]: (source)

Return a view of the cookie container's values.

Returns
ValuesView[str]A view object displaying the cookie's values.
__slots__: tuple[str, ...] = (source)

Undocumented

Undocumented