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 | add |
Add a header to the response. |
| Method | delete |
Delete a cookie by setting its expiration to the past. |
| Method | get |
Return the response body as bytes. |
| Method | get |
Return the data queued by withFlash() for the session flash bag. |
| Method | get |
Get the values for a header. |
| Method | get |
Return the media type of the response. |
| Method | get |
Return the headers as a list of (key, value) byte tuples. |
| Method | get |
Return the HTTP status code of the response. |
| Method | get |
Return the response stream if present. |
| Method | has |
Check if a header is present. |
| Method | has |
Check if the response has a stream. |
| Method | remove |
Remove a header from the response. |
| Method | render |
Render the content to bytes. |
| Async Method | run |
Run the background task if it exists. |
| Method | set |
Set a cookie header in the response. |
| Method | set |
Set a header, replacing any existing values. |
| Method | with |
Attach a cookie and return the response for chaining. |
| Method | with |
Attach several cookies at once and return the response. |
| Method | with |
Flash validation errors for the next request. |
| Method | with |
Flash a status message into the session and return the response. |
| Method | with |
Flash the submitted payload so the next request can repopulate it. |
| Method | without |
Expire a cookie and return the response for chaining. |
| Class Variable | __slots__ |
Undocumented |
overridden in
orionis.http.Responseoverridden in
orionis.http.ResponseReturn the response body as bytes.
| Returns | |
bytes | None | The response body as bytes, or None if not set. |
overridden in
orionis.http.ResponseReturn the media type of the response.
| Returns | |
str | None | The media type, or None if not set. |
overridden in
orionis.http.ResponseReturn the HTTP status code of the response.
| Returns | |
int | The HTTP status code. |
overridden in
orionis.http.ResponseReturn the response stream if present.
| Returns | |
AsyncIterable[bytes] | None | The response stream, or None if not set. |
overridden in
orionis.http.ResponseCheck if the response has a stream.
| Returns | |
bool | True if a stream is present, False otherwise. |
overridden in
orionis.http.ResponseRun the background task if it exists.
| Returns | |
None | This method does not return a value. |
def setCookie(self, key:
str, value: str = '', *, max_age: int | None = None, expires: datetime | str | int | None = None, path: str | None = '/', domain: str | None = None, secure: bool = False, http_only: bool = False, same_site: Literal[ 'lax', 'strict', 'none'] | None = 'lax', partitioned: bool = False):
(source)
¶
overridden in
orionis.http.ResponseSet a cookie header in the response.
| Parameters | |
key:str | The cookie name. |
value:str, optional | The cookie value. Defaults to an empty string. |
maxint | None, optional | The maximum age of the cookie in seconds. |
expires:datetime | str | int | None, optional | The expiration date of the cookie. |
path:str | None, optional | The path for which the cookie is valid. |
domain:str | None, optional | The domain for which the cookie is valid. |
secure:bool, optional | Whether the cookie is secure. |
httpbool, optional | Whether the cookie is HTTP only. |
samestr | None, optional | The SameSite policy for the cookie. |
partitioned:bool, optional | Whether the cookie is partitioned. |
| Returns | |
None | This method does not return a value. |
def withCookie(self, key:
str, value: str = '', *, max_age: int | None = None, expires: datetime | str | int | None = None, path: str | None = '/', domain: str | None = None, secure: bool = False, http_only: bool = False, same_site: Literal[ 'lax', 'strict', 'none'] | None = 'lax', partitioned: bool = False) -> Self:
(source)
¶
overridden in
orionis.http.ResponseAttach a cookie and return the response for chaining.
| Parameters | |
key:str | The cookie name. |
value:str, optional | The cookie value. Defaults to an empty string. |
maxint | None, optional | The maximum age of the cookie in seconds. |
expires:datetime | str | int | None, optional | The expiration date of the cookie. |
path:str | None, optional | The path for which the cookie is valid. |
domain:str | None, optional | The domain for which the cookie is valid. |
secure:bool, optional | Whether the cookie is secure. |
httpbool, optional | Whether the cookie is HTTP only. |
samestr | None, optional | The SameSite policy for the cookie. |
partitioned:bool, optional | Whether the cookie is partitioned. |
| Returns | |
Self | The same response instance, allowing fluent chaining. |
overridden in
orionis.http.Response