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 IFormData(ABC): (source)
Known subclasses: orionis.http.payload.form_data.FormData
Define the contract for parsed multipart form data.
Notes
Holds ordered (name, value) pairs from a multipart body, supports multiple values per field name, and releases open file handles via the context-manager protocol.
| 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 | __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 |
| 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. |
orionis.http.payload.form_data.FormDataEnter the context manager and return this instance.
| Returns | |
Self | The IFormData instance itself. |
type[ BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None):
(source)
¶
orionis.http.payload.form_data.FormDataExit 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. |
orionis.http.payload.form_data.FormDataReturn the number of unique field names.
| Returns | |
int | Count of distinct keys, not the total item count. |
orionis.http.payload.form_data.FormDataReturn the canonical string representation.
| Returns | |
str | Developer-facing string describing the instance. |
orionis.http.payload.form_data.FormDataClose all uploaded file handles to release resources.
| Returns | |
None | Always returns None. |
orionis.http.payload.form_data.FormDataReturn 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. |
orionis.http.payload.form_data.FormDataReturn all uploaded file values grouped by name.
| Returns | |
dict[str, list[UploadedFile]] | Mapping of field names to UploadedFile instances in insertion order. |