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.2.tar.gz (16.1 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.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mempy_miladtsx-0.2.2.tar.gz
  • Upload date:
  • Size: 16.1 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.2.tar.gz
Algorithm Hash digest
SHA256 98007fb14deed318382861998d01ccb15bae07e55e83990d144eccba9daa7afb
MD5 5db93656628207e1f1833810c88a202a
BLAKE2b-256 3864dd18aab3a5318a64ecbb4bad558c71ef92241969fbb9aeba2d8b1b3163aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for mempy_miladtsx-0.2.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: mempy_miladtsx-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 15.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7c15a223041c4b3218cab6ec9c80b3ca0e2b1b64d8c794a200d5f9f5eb5ab2f9
MD5 d6db737e721acd8260e036b4cbdb6f4d
BLAKE2b-256 e442ffa25847bd7268f6d7c1f73d3f103fa3cb0a78e8bf45b68fdbc8c5e30ee1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mempy_miladtsx-0.2.2-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