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

Represent a single part within a multipart HTTP request body.

Method __init__ Initialize a new MultipartPart from its MIME headers.
Method _parseContentDisposition Parse a Content-Disposition header into a key-value dict.
Method finalize Return this part's content in its final form.
Method write Append chunk to this part's data buffer.
Class Variable __slots__ Undocumented
Instance Variable _write Undocumented
Instance Variable content_type Undocumented
Instance Variable data Undocumented
Instance Variable filename Undocumented
Instance Variable headers Undocumented
Instance Variable is_file Undocumented
Instance Variable name Undocumented
def __init__(self, headers: dict[str, str], memory_threshold: int): (source)

Initialize a new MultipartPart from its MIME headers.

Parameters
headers:dict[str, str]Lowercased headers for this multipart part.
memory_threshold:intMaximum in-memory bytes before spilling to disk.
Returns
NoneConfigures instance attributes; no value is returned.
def _parseContentDisposition(self, disposition: str) -> dict[str, str]: (source)

Parse a Content-Disposition header into a key-value dict.

Preserve semicolons within single- or double-quoted values and prefer successfully decoded extended attributes over plain values.

Parameters
disposition:strRaw Content-Disposition header value.
Returns
dict[str, str]Lowercased attribute names mapped to unquoted values.
def finalize(self) -> UploadedFile | str: (source)

Return this part's content in its final form.

For field parts, applies Content-Transfer-Encoding decoding (base64 or quoted-printable) and decodes to a string using the charset declared in the part's Content-Type header, falling back to UTF-8.

Returns
UploadedFile | strThe UploadedFile handle for file parts, or the decoded string for field parts.
def write(self, chunk: bytes | bytearray | memoryview): (source)

Append chunk to this part's data buffer.

Parameters
chunk:bytesRaw bytes received from the multipart stream.
Returns
NoneDelegates to the pre-bound write callable; no value returned.

Undocumented

content_type: str | None = (source)

Undocumented

filename: str | None = (source)

Undocumented

Undocumented

Undocumented

Undocumented