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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98007fb14deed318382861998d01ccb15bae07e55e83990d144eccba9daa7afb
|
|
| MD5 |
5db93656628207e1f1833810c88a202a
|
|
| BLAKE2b-256 |
3864dd18aab3a5318a64ecbb4bad558c71ef92241969fbb9aeba2d8b1b3163aa
|
Provenance
The following attestation bundles were made for mempy_miladtsx-0.2.2.tar.gz:
Publisher:
python-publish.yml on miladtsx/mempy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mempy_miladtsx-0.2.2.tar.gz -
Subject digest:
98007fb14deed318382861998d01ccb15bae07e55e83990d144eccba9daa7afb - Sigstore transparency entry: 206493266
- Sigstore integration time:
-
Permalink:
miladtsx/mempy@b5d4187d80806786e6638eede1ed6bd7ba84ed9a -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/miladtsx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b5d4187d80806786e6638eede1ed6bd7ba84ed9a -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c15a223041c4b3218cab6ec9c80b3ca0e2b1b64d8c794a200d5f9f5eb5ab2f9
|
|
| MD5 |
d6db737e721acd8260e036b4cbdb6f4d
|
|
| BLAKE2b-256 |
e442ffa25847bd7268f6d7c1f73d3f103fa3cb0a78e8bf45b68fdbc8c5e30ee1
|
Provenance
The following attestation bundles were made for mempy_miladtsx-0.2.2-py3-none-any.whl:
Publisher:
python-publish.yml on miladtsx/mempy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mempy_miladtsx-0.2.2-py3-none-any.whl -
Subject digest:
7c15a223041c4b3218cab6ec9c80b3ca0e2b1b64d8c794a200d5f9f5eb5ab2f9 - Sigstore transparency entry: 206493269
- Sigstore integration time:
-
Permalink:
miladtsx/mempy@b5d4187d80806786e6638eede1ed6bd7ba84ed9a -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/miladtsx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b5d4187d80806786e6638eede1ed6bd7ba84ed9a -
Trigger Event:
release
-
Statement type: