In-memory stores¶
The simplest conceivable key-value store is found in
minimalkv.memory.DictStore
. It lends itself well for testing or
playing around with minimalkv.
- class minimalkv.memory.DictStore(d: Dict[str, bytes] | None = None)¶
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.
redis-backend¶
The redis-backend requires redis
to be installed and uses a
redis-database as a backend.
Currently, minimalkv targets the latest stable redis version, but since it uses very few commands available, it should work on older stables as well. Note that some features are unsupported on older redis-versions (such as sub-second accuracy for TTL values on redis < 2.6) and will cause redis to complain.