coredis
Fast, async, fully-typed Redis client with support for cluster and sentinel
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 on this page — 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
coredis on PyPI
pip
pip install coredisuv
uv add coredispoetry
poetry add coredisInstalling 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 the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — anyio, beartype, deprecated, exceptiongroup, packaging, typing-extensions |
| Maintenance | actively maintained — 22 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,568,552/month — #3,751 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: coredis-6.8.0-py3-none-any.whl
Keywords: Redis, Trio, anyio, asyncio, key-value store
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
aioredlockImplements the Redlock distributed lock…
permissive · top 15,000 on PyPI
redis-cliProvides a lightweight wrapper around redis-py…
permissive · top 15,000 on PyPI
aioredisAn asyncio-based Redis client library providing…
permissive · top 5,000 on PyPI
valkey-glideValkey GLIDE is an official async and sync…
permissive · top 5,000 on PyPI
anyioAnyIO provides a unified asynchronous API that…
permissive · top 100 on PyPI
Redis-Sentinel-UrlParses redis:// and redis+sentinel:// URLs and…
permissive · top 15,000 on PyPI
burner-redisRuns a Redis-compatible in-process database…
permissive · top 5,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
anysqliteAnysqlite wraps SQLite with an async/await…
unclear · top 5,000 on PyPI
taskiq-redisAdds Redis-based message brokers and result…
permissive · top 5,000 on PyPI