skillfed

coredis

Fast, async, fully-typed Redis client with support for cluster and sentinel

coredis v6.8.0 1.6M downloads/30d#3,751 on PyPI116
Permissive license MIT Active released

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 coredis

uv

uv add coredis

poetry

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 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

Development Status :: 5 - Production/StableFramework :: AnyIOFramework :: AsyncIOFramework :: TrioIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Distributed ComputingTyping :: Typed

Tags

async redis clienttyped redis libraryredis cluster supportasyncio redisredis sentinelanyio redisredis async python
async-ioredis-clienttype-safe

More Python Modules packages