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.
In-process session store backed by a plain dictionary.
Suitable for development and testing. The internal dictionary is instance-scoped: separate instances never share state.
Notes
Thread safety is not guaranteed. Use this store only in single- threaded event-loop environments (the standard asyncio model).
| Method | __init__ |
Initialise an empty in-memory session store. |
| Async Method | delete |
Remove the record for session_id (no-op when absent). |
| Async Method | gc |
Evict all records whose expires_at is in the past. |
| Async Method | read |
Return the stored record for session_id, or None. |
| Async Method | update |
Replace a live record without yielding between checking and writing. |
| Async Method | write |
Insert or replace the record keyed by its identifier. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | _storage |
Undocumented |
Evict all records whose expires_at is in the past.
Collects expired keys before mutating the dictionary to avoid modifying a collection during iteration.
| Returns | |
None | Undocumented |
Return the stored record for session_id, or None.
| Parameters | |
sessionstr | Unique session identifier to look up. |
| Returns | |
SessionRecord | None | The stored record, or None when absent. |
Replace a live record without yielding between checking and writing.
| Parameters | |
record:SessionRecord | Replacement record. |
| Returns | |
bool | Whether a live session still existed at the time of the update. |
Insert or replace the record keyed by its identifier.
| Parameters | |
record:SessionRecord | The record to persist. |
| Returns | |
None | Undocumented |