Skip to content

memory

memory

In-memory state backend for testing.

Provides a state backend that stores all state in memory without filesystem I/O. Useful for unit tests that need a real StateBackend implementation.

Classes

InMemoryStateBackend

InMemoryStateBackend()

Bases: StateBackend

In-memory state backend for testing.

Tracks state changes in a dict without filesystem I/O.

Source code in src/marianne/state/memory.py
def __init__(self) -> None:
    self.states: dict[str, CheckpointState] = {}