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.
Coordinates the session lifecycle for every HTTP request.
This class is a coordinator only. It never stores session data, never interprets the session payload, and never duplicates logic that belongs to Session or to the backing store.
| Parameters | |
| config | Resolved session configuration entity. |
| store | Pre-built backing-store instance. |
| Method | __delete |
Set an expired cookie to instruct the browser to clear it. |
| Method | __init__ |
Initialise the manager, pre-computing all request-invariant values. |
| Async Method | __invalidate |
Remove the session record and expire the cookie on response. |
| Async Method | __persist |
Write the current session state to the backing store. |
| Method | __register |
Register the session in the application container. |
| Method | __resolve |
Resolve and return the configured session store implementation. |
| Async Method | __restore |
Load a session from the store, or return a blank lazy session. |
| Async Method | __rotate |
Replace the session ID, deleting the old record from the store. |
| Method | __set |
Attach the session identifier cookie to response. |
| Async Method | abort |
Persist pending revocation when a request cannot produce a response. |
| Async Method | save |
Persist the session and set the cookie on response. |
| Async Method | start |
Restore or create a session for the incoming request. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | _app |
Undocumented |
| Instance Variable | _cookie |
Undocumented |
| Instance Variable | _cookie |
Undocumented |
| Instance Variable | _cookie |
Undocumented |
| Instance Variable | _cookie |
Undocumented |
| Instance Variable | _cookie |
Undocumented |
| Instance Variable | _cookie |
Undocumented |
| Instance Variable | _cookie |
Undocumented |
| Instance Variable | _cookie |
Undocumented |
| Instance Variable | _lifetime |
Undocumented |
| Instance Variable | _renewal |
Undocumented |
| Instance Variable | _renewal |
Undocumented |
| Instance Variable | _store |
Undocumented |
| Instance Variable | _track |
Undocumented |
| Property | tracks |
Return whether session middleware remembers successful navigation URLs. |
Initialise the manager, pre-computing all request-invariant values.
| Parameters | |
app:IApplication | The application instance. |
cache:ICacheManager | The application's cache manager, injected so the cache-backed store can be built without depending on the Cache facade's pin state. |
| Returns | |
None | Undocumented |
Path, config: SessionConfig, cache: ICacheManager) -> ISessionStore:
(source)
¶
Resolve and return the configured session store implementation.
| Parameters | |
basePath | Base project path used to resolve file-store directories. |
config:SessionConfig | Session configuration containing the selected driver. |
cache:ICacheManager | The application's cache manager, used by the cache driver. |
| Returns | |
ISessionStore | File-backed store when the file driver is selected; otherwise an in-memory store. |
Load a session from the store, or return a blank lazy session.
The store is trusted to handle expiry: a None return means the record was absent or already expired.
| Parameters | |
sessionstr | The identifier read from the session cookie. |
| Returns | |
Session | Restored session, or a blank lazy session on cache miss. |
Persist the session and set the cookie on response.
No-op when the session was never activated. With a renewal interval, unchanged scalar payloads retain their existing store and cookie expiry until the deadline; mutable payloads are always persisted. Browser session cookies still omit Max-Age when expire_on_close is enabled.
| Parameters | |
response:Response | Outgoing HTTP response. |
session:Session | The session returned by start(). |
| Returns | |
None | Undocumented |