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 IUploadedFile(ABC): (source)
Known subclasses: orionis.http.payload.uploaded_file.UploadedFile
Define the contract for an uploaded file held in memory or on disk.
Implementations buffer incoming bytes via write(), optionally spill to a temporary file, and expose content through read() and save().
| Method | chunks |
Iterate over the file content in fixed-size chunks. |
| Method | close |
Close the file handle and release all associated resources. |
| Method | read |
Read the entire file content from the beginning. |
| Method | replace |
Replace the file content with data and update the byte counter. |
| Method | save |
Write the file contents to path on the local filesystem. |
| Method | write |
Append chunk to the file buffer. |
| Class Variable | __slots__ |
Undocumented |
| Property | extension |
Return the file extension derived from filename, in lowercase. |
| Property | size |
Return the total number of bytes written so far. |
orionis.http.payload.uploaded_file.UploadedFileClose the file handle and release all associated resources.
| Returns | |
None | Undocumented |
orionis.http.payload.uploaded_file.UploadedFileRead the entire file content from the beginning.
| Returns | |
bytes | Full file contents. |
orionis.http.payload.uploaded_file.UploadedFileAppend chunk to the file buffer.
Append at the end even when a previous read moved the cursor.
| Parameters | |
chunk:bytes | bytearray | memoryview | Raw bytes to append. |
| Returns | |
None | Undocumented |
orionis.http.payload.uploaded_file.UploadedFileReturn the file extension derived from filename, in lowercase.
| Returns | |
str | Lowercase suffix including the leading dot (e.g. ".png"). Empty string if the filename has no extension. |
orionis.http.payload.uploaded_file.UploadedFileReturn the total number of bytes written so far.
| Returns | |
int | Cumulative byte count across all write calls. |