minimalkv.memory package

Submodules

Module contents

class minimalkv.memory.DictStore(d: Dict[str, bytes] | None = None)

Bases: KeyValueStore, CopyMixin

Store data in a dictionary.

This store uses a dictionary as the backend for storing, its implementation is straightforward. The dictionary containing all data is available as d.

d: Dict[str, bytes]
iter_keys(prefix: str = '') Iterator[str]

Iterate over all keys in the store starting with prefix.

Parameters

prefixstr, optional, default = ‘’

Only iterate over keys starting with prefix. Iterate over all keys if empty.