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
Hold parsed multipart form fields and uploaded files.
Notes
Stores ordered (name, value) pairs and supports multiple values under the same field name. Implements the context-manager protocol to guarantee all open file handles are released on exit.
| Method | __contains__ |
Return True if at least one item with key exists. |
| Method | __enter__ |
Enter the context manager and return this instance. |
| Method | __exit__ |
Exit the context manager and close all uploaded file handles. |
| Method | __getitem__ |
Return the last value for key using subscript notation. |
| Method | __init__ |
Initialize FormData from an ordered list of (name, value) pairs. |
| Method | __iter__ |
Iterate over unique field names in first-seen insertion order. |
| Method | __len__ |
Return the number of unique field names. |
| Method | __repr__ |
Return the canonical string representation. |
| Method | close |
Close all uploaded file handles to release resources. |
| Method | get |
Return the last value for key, or default. |
| Method | get |
Return every value for key in insertion order. |
| Method | multi |
Return all (name, value) pairs in insertion order. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | _index |
Undocumented |
| Instance Variable | _items |
Undocumented |
| Property | all |
Return all (name, value) pairs in insertion order. |
| Property | fields |
Return all text field values grouped by name. |
| Property | files |
Return all uploaded file values grouped by name. |
def __exit__(self, exc_type:
type[ BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None):
(source)
¶
Exit the context manager and close all uploaded file handles.
| Parameters | |
exctype[BaseException] | None | Exception class if one was raised, otherwise None. |
excBaseException | None | Exception instance if one was raised, otherwise None. |
excTracebackType | None | Traceback if an exception was raised, otherwise None. |
| Returns | |
None | Always returns None. |
Return the canonical string representation.
| Returns | |
str | Developer-facing string showing the stored item pairs. |
Return the last value for key, or default.
| Parameters | |
key:str | Field name to look up. |
default:object | None, optional | Fallback when key is absent. Defaults to None. |
| Returns | |
object | None | Last str or UploadedFile for key, or default. |
Return all uploaded file values grouped by name.
| Returns | |
dict[str, list[UploadedFile]] | Mapping of field names to UploadedFile instances in insertion order. |