MemPy is a minimal, self-contained Python in-memory key-value store inspired by Redis. It supports basic commands (SET
, GET
, DELETE
, INCR
) and optional TTL (Time-To-Live) expiration.
⚠️ Not production-ready.
- Simple key-value storage
- Optional TTL (lazy expiration)
- Integer increment support
- No dependencies
pip install mempy-miladtsx
from mempy_miladtsx.mempy import MemPy
mem = MemPy()
mem.set("foo", "bar", ttl=10)
print(mem.get_value("foo"))
- Eager TTL expiration (background thread)
- More data types (sets, lists, hashes)
- Persistence (AOF/RDB)
- Pub/Sub, CLI
See LICENSE.