Skip to content

miladtsx/mempy

Repository files navigation

🧠 MemPy — A Minimal In-Memory Key-Value Store

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.

Features

  • Simple key-value storage
  • Optional TTL (lazy expiration)
  • Integer increment support
  • No dependencies

Installation

pip install mempy-miladtsx

Example Usage

from mempy_miladtsx.mempy import MemPy

mem = MemPy()
mem.set("foo", "bar", ttl=10)
print(mem.get_value("foo"))

Contribution

contribution

Roadmap

  • Eager TTL expiration (background thread)
  • More data types (sets, lists, hashes)
  • Persistence (AOF/RDB)
  • Pub/Sub, CLI

License

See LICENSE.

About

learning lab - minimal in-memory key-value store

Topics

Resources

License

Stars

Watchers

Forks

Languages