ORIONIS API REFERENCE

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.

class documentation

Contract every session backing-store must satisfy.

Responsibilities

  • Persist and retrieve SessionRecord objects.
  • Remove records on demand.
  • Reject updates to absent or expired records atomically.
  • Collect expired records via gc().

The store is not responsible for:

  • Knowing about Request or Response.
  • Generating session identifiers.
  • Creating Session objects.
  • Choosing the lifetime duration (the manager does that).
Async Method delete Remove the record for session_id; a no-op when absent.
Async Method gc Remove all records whose expires_at is in the past.
Async Method read Return the stored record for session_id, or None.
Async Method update Update a live session atomically without creating a missing record.
Async Method write Persist record, creating or overwriting the existing entry.
Class Variable __slots__ Undocumented
@abstractmethod
async def delete(self, session_id: str) -> bool: (source)

Remove the record for session_id; a no-op when absent.

Parameters
session_id:strUnique session identifier to remove.
Returns
boolTrue if this call removed a record; False when already absent.
@abstractmethod
async def read(self, session_id: str) -> SessionRecord | None: (source)

Return the stored record for session_id, or None.

Parameters
session_id:strUnique session identifier to look up.
Returns
SessionRecord | NoneThe stored record, or None when absent.
@abstractmethod
async def update(self, record: SessionRecord) -> bool: (source)

Update a live session atomically without creating a missing record.

Parameters
record:SessionRecordReplacement session payload and expiration.
Returns
boolTrue only when a live record was updated. Deletion or expiry must win over a stale request's write, including across workers.
@abstractmethod
async def write(self, record: SessionRecord): (source)

Persist record, creating or overwriting the existing entry.

Parameters
record:SessionRecordThe record to store.
Returns
NoneUndocumented