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.
Contract for a single HTTP session runtime object.
Implementors manage an in-memory key-value payload, flash data for one-request-lifetime values, and state flags consumed by the SessionManager (started, dirty, invalidated).
Notes
Implementors must never interact directly with Request, Response, or any ISessionStore. All I/O is the responsibility of the SessionManager.
| Method | all |
Return a shallow copy of the current session data. |
| Method | clear |
Remove all data from this session. |
| Method | flash |
Store value under key for exactly one subsequent request. |
| Method | flash |
Flash validation errors for the next request. |
| Method | flash |
Flash a submitted form payload so the next request can repopulate it. |
| Method | forget |
Remove key from session data (no-op when absent). |
| Method | get |
Return the value for key, or default when absent. |
| Method | get |
Return the validation errors flashed for this request. |
| Method | get |
Return the flash value for key. |
| Method | get |
Return the value submitted for key in the previous request. |
| Method | get |
Return the last page the user navigated to. |
| Method | has |
Return True when key exists in the session data. |
| Method | invalidate |
Mark the session for full deletion and clear in-memory data. |
| Method | put |
Store value under key, activating the session on the first call. |
| Method | regenerate |
Request a session ID rotation (e.g. immediately after login). |
| Method | set |
Remember the page the user is currently viewing. |
| Class Variable | __slots__ |
Declare that this class introduces no additional instance slots. |
| Property | dirty |
Report whether changes require persistence. |
| Property | id |
Return the current session identifier. |
| Property | invalidated |
Report whether the session has been invalidated. |
| Property | is |
Report whether the session has a new storage identity. |
| Property | started |
Report whether the session has been activated. |
| Property | wants |
Report whether the session requests identifier rotation. |
orionis.session.session.SessionReturn a shallow copy of the current session data.
| Returns | |
dict[str, typing.Any] | Copy of all session key-value pairs including internal flash bags. |
orionis.session.session.SessionRemove all data from this session.
| Returns | |
None | No return value. |
orionis.session.session.SessionStore value under key for exactly one subsequent request.
| Parameters | |
key:str | Flash data key. |
value:typing.Any | Flash data value. |
| Returns | |
None | No return value. |
orionis.session.session.SessionFlash validation errors for the next request.
| Parameters | |
errors:collections.abc.Mapping[str, typing.Any] | Exception | Mapping of field to message(s), or a validation exception. |
| Returns | |
None | No return value. |
orionis.session.session.SessionFlash a submitted form payload so the next request can repopulate it.
| Parameters | |
values:collections.abc.Mapping[str, typing.Any] | Submitted payload to remember. Credential-like fields are stripped before storing. |
| Returns | |
None | No return value. |
orionis.session.session.SessionReturn the value for key, or default when absent.
| Parameters | |
key:str | Session data key. |
default:typing.Any, optional | Fallback value returned when key is not found. |
| Returns | |
typing.Any | The stored value, or default. |
orionis.session.session.SessionReturn the flash value for key.
Values flashed during the current request take precedence over the ones inherited from the previous one.
| Parameters | |
key:str | Flash data key. |
default:typing.Any, optional | Fallback value when the key is absent from both bags. |
| Returns | |
typing.Any | The flash value, or default. |
orionis.session.session.SessionReturn the value submitted for key in the previous request.
| Parameters | |
key:str | Form field name. |
default:typing.Any, optional | Fallback value when the field was not submitted. |
| Returns | |
typing.Any | The previously submitted value, or default. |
orionis.session.session.SessionReturn the last page the user navigated to.
| Parameters | |
default:str | None, optional | Fallback returned when no page has been recorded yet. |
| Returns | |
str | None | The stored URL, or default. |
orionis.session.session.SessionMark the session for full deletion and clear in-memory data.
| Returns | |
None | No return value. |
orionis.session.session.SessionStore value under key, activating the session on the first call.
| Parameters | |
key:str | Session data key. |
value:typing.Any | Value to store. |
| Returns | |
None | No return value. |
orionis.session.session.SessionRequest a session ID rotation (e.g. immediately after login).
| Returns | |
None | No return value. |
orionis.session.session.SessionDeclare that this class introduces no additional instance slots.
orionis.session.session.SessionReport whether changes require persistence.
| Returns | |
bool | True when tracked changes require a backing-store write. |
orionis.session.session.SessionReturn the current session identifier.
| Returns | |
str | None | Identifier, or None before activation. |
orionis.session.session.SessionReport whether the session has been invalidated.
| Returns | |
bool | True when the session is marked for full deletion. |
orionis.session.session.SessionReport whether the session has a new storage identity.
| Returns | |
bool | True until the current identifier has been persisted. |
orionis.session.session.SessionReport whether the session has been activated.
| Returns | |
bool | True after activation or restoration from a store. |