Python Redis libraries

Updated Nov 2026

Python Redis libraries connect applications to Redis, the in-memory key-value store, to read and write keys and run its commands. Higher-level libraries map Python containers and object models onto Redis keys rather than exposing raw commands. These libraries let web apps, task workers, and AI agents share cached data across processes.

Popularity

redis-py has the most monthly downloads in this comparison, at 247.7M.

LibraryMonthly downloadsStarsLast releaseLicense
redis-py
247.7M
13.7KJul 2026MIT
Fakeredis
44.4M
473Oct 2026BSD-3-Clause
hiredis
39.1M
527Oct 2026MIT
coredis
2.5M
118Aug 2026MIT
RedisVL
2.2M
437Nov 2026MIT
Pottery
764.0K
1.2KMar 2025Apache-2.0
Walrus
155.7K
1.2KJan 2026MIT
Redis OM Python
148.6K
1.3KOct 2026BSD-3-Clause
Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

Provides a Python client interface to the Redis key-value store.

Downloads / mo
247.7M
Stars
13.7K
Last release
8.1.0
License
MIT

Strengths

  • Provides synchronous and asynchronous clients. Use blocking clients or the asyncio API from the same package.
  • Groups commands into atomic transactions. Use transactional pipelines to execute buffered commands atomically.

Limitations

  • Pipelines cannot cross thread boundaries. Keep PubSub and Pipeline objects within their owning thread.

Quickstart

From README.md
$ pip install redis
import redis
client = redis.Redis(host='localhost', port=6379, db=0)
client.set('foo', 'bar')

redis-py examples

From open-source projects on GitHub

Implements the Redis API in Python for testing.

Downloads / mo
44.4M
Stars
473
Last release
2.40.0
License
BSD-3-Clause

Quickstart

From README.md
$ pip install fakeredis
import fakeredis
client = fakeredis.FakeStrictRedis()
client.set('foo', 'bar')

Parses Redis protocol replies from byte streams without handling network I/O.

Downloads / mo
39.1M
Stars
527
Last release
3.5.0
License
MIT

Strengths

  • Parses incomplete reply streams. Feed byte chunks and retrieve replies when a complete response is buffered.
  • Decodes Unicode bulk replies. Choose an encoding and error policy when constructing Reader.

Limitations

  • Needs separate networking code. Provide connection management and the network read loop elsewhere.
  • False can mean incomplete data. Choose a custom sentinel when parsing native RESP booleans.

Quickstart

From README.md
$ pip install hiredis
import hiredis
reader = hiredis.Reader()
reader.feed(b'$5\r\nhello\r\n')
print(reader.gets())

hiredis examples

From open-source projects on GitHub

Provides an asynchronous typed Redis client with cluster and Sentinel support.

Downloads / mo
2.5M
Stars
118
Last release
6.9.0
License
MIT

Strengths

  • Uses native asynchronous call sites. Await Redis commands in an asynchronous application.
  • Connects to clusters and Sentinel. Use the RedisCluster and Sentinel client interfaces.

Limitations

  • Requires asynchronous call sites. Await commands instead of using a blocking client interface.

Quickstart

From README.md
$ pip install coredis
import anyio
import coredis

async def main():
    async with coredis.Redis(host='127.0.0.1', port=6379, db=0) as client:
        await client.set('foo', 1)

anyio.run(main)

coredis examples

From open-source projects on GitHub

Uses Redis as a vector database through a Python client and CLI.

Downloads / mo
2.2M
Stars
437
Last release
0.32.1
License
MIT

Quickstart

From searchindex.html
$ pip install redisvl
from redisvl.index import SearchIndex
index = SearchIndex.from_dict({'index': {'name': 'my-index', 'prefix': 'rvl', 'storage_type': 'hash'}, 'fields': [{'name': 'doc-id', 'type': 'tag'}]}, redis_url='redis://localhost:6379')
index.create()

Provides a Python interface to Redis.

Downloads / mo
764.0K
Stars
1.2K
Last release
3.0.1
License
Apache-2.0

Quickstart

From README.md
$ pip install pottery
from redis import Redis
from pottery import RedisDict
client = Redis.from_url('redis://localhost:6379/1')
tel = RedisDict({'jack': 4098, 'sape': 4139}, redis=client, key='tel')

Extends redis-py with Python-style containers and higher-level Redis utilities.

Downloads / mo
155.7K
Stars
1.2K
Last release
0.9.8
License
MIT

Strengths

  • Adds Python-style Redis containers. Work with hashes, lists, sets, and other container wrappers.
  • Reuses existing Redis client methods. Use Redis methods alongside the higher-level helper API.

Limitations

  • Nested atomic blocks commit separately. An inner atomic block commits independently of its outer block.

Quickstart

From full-text-search.html
$ pip install walrus
from walrus import Database
db = Database(decode_responses=True)
h = db.Hash('charlie')
h.update(name='Charlie', favorite_cat='Huey')

Redis OM Python

Maps Python objects to Redis.

Downloads / mo
148.6K
Stars
1.3K
Last release
1.2.0
License
BSD-3-Clause

Quickstart

From README.md
$ pip install redis-om
from redis_om import HashModel

class Customer(HashModel):
    first_name: str

customer = Customer(first_name='Andrew')
customer.save()

FAQ

redis-py suits most applications, with synchronous and asynchronous clients and atomic transactions. coredis suits async code that wants a typed client with cluster and Sentinel support. Fakeredis suits tests that need the Redis API without a server.

redis-py is the Python client for the Redis database and key-value store. It provides synchronous and asynchronous clients and groups commands into atomic transactions.

hiredis is a Python wrapper for the hiredis parser. It reads Redis protocol replies from byte streams and does no network I/O of its own.

RedisVL is a Python client library and CLI for using Redis as a vector database.

No. A redis-py Pipeline or PubSub object should stay in the thread that created it.

For coding agents

Found your Redis library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official