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.
Provide session operations.
Includes filter_input, normalize_errors, queue_bag, apply_flash.
| Class | _ |
Queue flash payloads for responses and deferred views. |
| Function | _normalize |
Extract a structured message or stringify a scalar value. |
| Function | apply |
Write a pending flash payload into the session. |
| Function | filter |
Drop credential-like fields from a form payload before flashing it. |
| Function | normalize |
Normalize validation errors into field-indexed message lists. |
| Function | queue |
Merge values into the reserved bag key of a pending flash payload. |
| Constant | _SEQUENCE |
Hoisted so the isinstance check does not rebuild the tuple on every field. |
| Constant | ERRORS |
Session key containing flashed validation errors. |
| Constant | OLD |
Reserved flash-bag keys owned by the framework. Application code must never write them directly; use withInput() / withErrors() instead. |
| Constant | PREVIOUS |
Reserved session key holding the last page the user navigated to. |
| Constant | SENSITIVE |
Never carried over when repopulating a form. |
Write a pending flash payload into the session.
Reserved bags are routed through their dedicated session methods so they merge with anything already flashed during this request instead of replacing it.
| Parameters | |
session:orionis.session.contracts.ISession | Session receiving the flashed values. |
data:collections.abc.Mapping[str, typing.Any] | Pending flash payload. |
| Returns | |
None | No return value. |
Drop credential-like fields from a form payload before flashing it.
| Parameters | |
values:collections.abc.Mapping[str, typing.Any] | Raw submitted payload. |
| Returns | |
dict[str, typing.Any] | Copy of values without any field listed in
orionis.session.flash.SENSITIVE_INPUT_FIELDS. |
Normalize validation errors into field-indexed message lists.
| Parameters | |
errors:object | Mapping of messages or {rule, message} details, or an exception exposing errors or failure. |
| Returns | |
dict[str, list[str]] | String messages grouped by field, with structured rule codes omitted. |
| Raises | |
TypeError | If errors is neither a mapping nor a validation exception. |
Merge values into the reserved bag key of a pending flash payload.
| Parameters | |
flash:dict[str, typing.Any] | Pending flash payload owned by a response or a pending view. |
key:str | Reserved bag key. |
values:collections.abc.Mapping[str, typing.Any] | Entries to merge into the bag. |
| Returns | |
None | No return value. |
Reserved flash-bag keys owned by the framework. Application code must never write them directly; use withInput() / withErrors() instead.
| Value |
|