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
class MultipartPart(IMultipartPart): (source)
Constructor: MultipartPart(headers, memory_threshold)
Represent a single part within a multipart HTTP request body.
| Method | __init__ |
Initialize a new MultipartPart from its MIME headers. |
| Method | _parse |
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__ |
Declare the instance attribute slots reserved by this class. |
| Instance Variable | _write |
Callable used to append bytes to the current multipart part. |
| Instance Variable | content |
Content type produced by headers.get. |
| Instance Variable | data |
Select the file or field buffer writer for this part. |
| Instance Variable | filename |
Filename used when rendering or storing the resource. |
| Instance Variable | headers |
Lowercased headers for this multipart part. |
| Instance Variable | is |
A part is treated as a file upload when a filename is declared. |
| Instance Variable | name |
Assign field metadata extracted from the disposition attributes. |
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:str | Raw Content-Disposition header value. |
| Returns | |
dict[str, str] | Lowercased attribute names mapped to unquoted values. |
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 | |
orionis.http.payload.uploaded_file.UploadedFile | str | The UploadedFile handle for file parts, or the decoded string for field parts. |