--- id: coredis version: "6.8.0" license: MIT license_treatment: permissive maintenance: active --- # coredis — Fast, async, fully-typed Redis client with support for cluster and sentinel License: permissive · Maintenance: active · Downloads: 1.6M/mo ## What it is and what it does Coredis is an async Redis client library designed for modern Python applications that need non-blocking I/O. It provides full type hints throughout its API, including for pipelines and Lua scripts, making it suitable for codebases that rely on static type checking. The client is built on anyio, an async abstraction layer, which means it works seamlessly with both asyncio and trio—the two major async frameworks in Python. The library handles single-node Redis, cluster deployments, and sentinel-based high-availability setups. It includes features like connection pooling, pipelining, pub/sub, Lua scripting, stream consumers, and server-assisted client-side caching. Optional runtime type validation is available via beartype. The package targets Python 3.10 and later, including PyPy, and is tested against Redis 7.0 and compatible databases like Valkey and Dragonfly. Use it for: - Building async web services that need Redis for caching, sessions, or rate limiting without blocking the event loop. - Implementing Redis Cluster clients in applications requiring horizontal scaling and automatic failover. - Using Redis Sentinel for high-availability setups where automatic primary/replica failover is needed. - Writing type-safe async code where IDE autocomplete and static type checking on Redis commands are valuable. - Streaming data processing with Redis Streams using the built-in stream consumer API. - Pub/Sub messaging in async applications with support for both asyncio and trio backends. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. An async Redis client with full type hints, supporting cluster and sentinel deployments, built on anyio for compatibility with asyncio and trio. Yes. Coredis is actively maintained, has low install friction, carries no known vulnerabilities, and is MIT-licensed. It is the right choice if you need an async Redis client with strong typing, cluster/sentinel support, and flexibility between asyncio and trio. If you only need synchronous Redis access or are on Python <3.10, look elsewhere. ## Install pip install coredis uv add coredis poetry add coredis ## Installing coredis Before you install: Low install friction with a pure-Python wheel and six well-maintained runtime dependencies. Actively maintained with a release 22 days ago and recent commits. License in practice: MIT license permits commercial and private use with minimal restrictions; suitable for most projects. Quickstart: import anyio import coredis async def main(): client = coredis.Redis(host='127.0.0.1', port=6379, decode_responses=True) async with client: await client.set("key", "value") result = await client.get("key") anyio.run(main, backend="asyncio") Requires Python 3.10 or later; a running Redis server (7.0+) or compatible database like Valkey or Dragonfly. Verify before relying: - Performance characteristics compared to other async Redis clients in production workloads. - Completeness of Redis Stack module support beyond what is documented. - Real-world experience with client-side caching behavior under high concurrency. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags async redis client, typed redis library, redis cluster support, asyncio redis, redis sentinel, anyio redis, redis async python, async-io, redis-client, type-safe [View on SkillFed](https://skillfed.io/packages/coredis) · [View on PyPI](https://pypi.org/project/coredis/)