common_rates.limiters.memory
The in-memory backend: one process, one lock per scope, the wall clock.
Classes
MemoryLimiter
Bases: BaseLimiter
State in this process, gone when it ends.
Carried state: the base’s, plus each scope’s state and lock, and the clock it reads, the wall clock unless a test hands it another. Nothing to open or close; it is usable as built.
__init__
def __init__(config: MemoryLimiterConfig | None = None, *, clock: Callable[[], float] | None = None) -> NoneFields and properties declared here; inherited members belong to the bases above.
BACKEND
BACKEND: str = 'memory'open
async def open() -> MemoryLimiter