A simple Redis client for Python with support for: namespacing and JSON serialization/deserialization, designed for middleware applications.
Project description
# redis-namespace-client
A simple Redis client for Python with support for:
- Namespacing
- JSON serialization
- Expiry (TTL)
- Logging
- `.env` support via `python-dotenv`
## Installation
```bash
pip install redis-namespace-client
Usage
from redis_namespace_client import redis_set, redis_get
# Set a key
redis_set("mykey", {"foo": "bar"}, ex=3600)
# Get the key
value = redis_get("mykey")
print(value)
Environment Variables
Create a .env file or export these:
REDIS_ERP_HOST=localhost
REDIS_ERP_PORT=6379
REDIS_ERP_DB=3
REDIS_ERP_NAMESPACE=my_namespace
Enjoy
[](https://pypi.org/project/redis-namespace-client/)
Project details
Release history Release notifications | RSS feed
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 redis_namespace_client-0.1.0.tar.gz.
File metadata
- Download URL: redis_namespace_client-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9020f07e0bd07e58db80bdea69757af7b6533eaf5aea3ba206c7a1afb562cba8
|
|
| MD5 |
9c01a22206b3c4f5814301e6235e0de0
|
|
| BLAKE2b-256 |
775a6485b193aeb86903842e9aac432e8ce43689a1e65ea0ff5b9e51f2dd287e
|
File details
Details for the file redis_namespace_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: redis_namespace_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52f5423a4a0ea815438454a5ce4cefaf1eb3e52a873eda8bf1e55e84ee21e303
|
|
| MD5 |
1446a9dbf02a69ab008da7bde03530e7
|
|
| BLAKE2b-256 |
07354f7f6a66f9f7f3716e73d307115cade5c2b8adcbdbc810f6cc65ceb9f481
|