A lightweight Redis client manager with sync/async support
Project description
PyRedisManager
A lightweight, standalone Redis client manager supporting both synchronous and asynchronous operations, multi-alias management, and module-level singleton design. Only depends on the official redis / redis.asyncio library—no Flask, Django, or other frameworks required.
install
pip install pyredis-manager
Synchronous Example:
from pyredis_manager import redis_manager
redis_manager.set_alias('default', 0)
default = redis_manager.get('default')
default.set(name='foo', value='bar', ex=300)
val = default.get('foo')
print(val)
Asynchronous Example:
import asyncio
from pyredis_manager import async_redis_manager
async def main():
async_redis_manager.set_alias("default", 0)
default = async_redis_manager.get("default")
await default.set(name="fooo", value="barr", ex=300)
val = await default.get("fooo")
print(val)
asyncio.run(main())
Features
-
Module-level singleton for a globally unique instance
-
Multi-alias management, each alias maps to an independent Redis DB
-
Supports synchronous and asynchronous Redis clients
-
Simple, type-hinted, IDE-friendly API
-
Framework-agnostic
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 pyredis_manager-0.1.4.tar.gz.
File metadata
- Download URL: pyredis_manager-0.1.4.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5c6632deab985049d21fbaf8c4ea3a6c126470268b571b22374458a126913ad
|
|
| MD5 |
d0e2876f9e56ad32ab007bb9fb82c9a5
|
|
| BLAKE2b-256 |
489619ff5ed373494d9186fd41ab8d3b670d74baa46a061b791848d3d30bad8b
|
File details
Details for the file pyredis_manager-0.1.4-py3-none-any.whl.
File metadata
- Download URL: pyredis_manager-0.1.4-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47c16c6af36f39fdb9b3b82a1e1d53d51711b5ff4bb84547b09d5e784a64ec4b
|
|
| MD5 |
80301b0c53e375618565426cdfbf6200
|
|
| BLAKE2b-256 |
ea06d776313e3e8f553815d67781743e4574dd4d6e389e33c376d9d3b9dec9ed
|