Skip to main content

A lightweight Redis client manager with sync/async support

Project description

RedisManager

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

pyredis_manager-0.1.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyredis_manager-0.1.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file pyredis_manager-0.1.2.tar.gz.

File metadata

  • Download URL: pyredis_manager-0.1.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for pyredis_manager-0.1.2.tar.gz
Algorithm Hash digest
SHA256 04672f150c00492301c34de079c3b43af559986e700b89a6852091bc91e5d48d
MD5 9675cbcb1e96e595cfc843528ac94210
BLAKE2b-256 020a09d6559d94a2b9e96d11e67a8d89d132f9776c0142ef7efe5ab2a6302c0e

See more details on using hashes here.

File details

Details for the file pyredis_manager-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pyredis_manager-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7f0a989920e02ee929fb8199d97b9fe1f970dc037a585f6bd136f97a4e90539
MD5 25ab2a29fdcf2a395a7c42eb04ab8b96
BLAKE2b-256 bbaa0f940bf16671cdc872b7d7b0a65ea48cdee0201d5d6ec1d3e4c6e616cb44

See more details on using hashes here.

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