Skip to main content

A lightweight in-memory store in pure Python

Project description

🧠 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mempy_miladtsx-0.2.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mempy_miladtsx-0.2.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file mempy_miladtsx-0.2.0.tar.gz.

File metadata

  • Download URL: mempy_miladtsx-0.2.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mempy_miladtsx-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cc70af9221296057d01edd799b1b4d09476cb9cac33933e5c7c7a7553910353a
MD5 45148d64521ef77abff6d3eaa88872af
BLAKE2b-256 86251a645350d84ade2b6b433cdd71d704d147c0aa218ee101b97ecbe2d40394

See more details on using hashes here.

Provenance

The following attestation bundles were made for mempy_miladtsx-0.2.0.tar.gz:

Publisher: python-publish.yml on miladtsx/mempy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mempy_miladtsx-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mempy_miladtsx-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mempy_miladtsx-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 995a42cd492ad7d562fdb3b73912b98b7db03b3a356d7222492e3b2d74d0dbf6
MD5 eaaf216a062b21240f4928cb5d51301f
BLAKE2b-256 dcbb6f5d51fc09c1b6e512e6cb464739f1b6c2019dbfec6dee7812d58ef2b564

See more details on using hashes here.

Provenance

The following attestation bundles were made for mempy_miladtsx-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on miladtsx/mempy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page