hashkv
Async helpers to get/set string values for hashed Redis keys with TTL.
Key format: "{prefix}:{hash_hex}". You pass a precomputed hash string.
Install
pip install hashkv
Usage
import asyncio
from hashkv import get_hash_value, set_hash_value
async def main():
url = "redis://localhost:6379/0"
prefix = "some_prefix"
hash_hex = "cf2d9b0f..." # your hash
await set_hash_value(hash_hex, value="ok", ttl_seconds=600, redis_url=url, key_prefix=prefix)
cur = await get_hash_value(hash_hex, redis_url=url, key_prefix=prefix)
print(cur) # "ok"
if __name__ == "__main__":
asyncio.run(main())
MIT © Eugene Evstafev
Metadata
Release files for hashkv 2025.8.241553
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hashkv-2025.8.241553.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hashkv-2025.8.241553-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.9 kB
Release files / hashkv-2025.8.241553.tar.gz
| Download URL | hashkv-2025.8.241553.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1526afac836b6f8b4d8cb13bbf23d500dac822b4957205e6a2c539384c5c324
|
|
BLAKE2b-256 checksum How to use checksums |
9e43d6e4247b845d68e87956f7c972e56ce78c494ddcea8f8adec2b6083edabf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.11
|
Release files / hashkv-2025.8.241553-py3-none-any.whl
| Download URL | hashkv-2025.8.241553-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1726dd59c1e83a5ccb8777511603e429a522b09128c9568e63ba85c2d699739a
|
|
BLAKE2b-256 checksum How to use checksums |
054cdcd1224417f16f86be71acdd2a0bdd24fda4ea83d69e0501dcd398b8ff19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.11
|