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__ |
Undocumented |
| Property | dirty |
True if pending changes must be written to the backing store. |
| Property | id |
Current session identifier, or None before the first write. |
| Property | invalidated |
True when the session has been marked for full deletion. |
| Property | is |
True for sessions not loaded from a backing store. |
| Property | started |
True once the session has been activated by a write. |
| Property | wants |
True when the session ID should be rotated before saving. |
orionis.session.session.SessionRemove all data from this session.
| Returns | |
None | Undocumented |
orionis.session.session.SessionReturn the value for key, or default when absent.
| Parameters | |
key:str | Session data key. |
default:Any, optional | Fallback value returned when key is not found. |
| Returns | |
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:Any, optional | Fallback value when the key is absent from both bags. |
| Returns | |
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:Any, optional | Fallback value when the field was not submitted. |
| Returns | |
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 | Undocumented |
orionis.session.session.SessionRequest a session ID rotation (e.g. immediately after login).
| Returns | |
None | Undocumented |
orionis.session.session.SessionTrue if pending changes must be written to the backing store.
| Returns | |
bool | Result of the operation described above. |
orionis.session.session.SessionCurrent session identifier, or None before the first write.
| Returns | |
str | None | Result of the operation described above. |
orionis.session.session.SessionTrue when the session has been marked for full deletion.
| Returns | |
bool | Result of the operation described above. |
orionis.session.session.SessionTrue for sessions not loaded from a backing store.
| Returns | |
bool | Result of the operation described above. |
orionis.session.session.SessionTrue once the session has been activated by a write.
| Returns | |
bool | Result of the operation described above. |