The official Python client for Redis
open sourceMITfree
redis-py is the Python interface to Redis, developed and maintained by Redis Inc and installed with pip install redis. It follows Redis's command syntax, with connection pools, pipelines and MULTI/EXEC transactions, Pub/Sub, asyncio connections, Redis Cluster and Sentinel clients, RESP3 (the default on the wire since 8.0), an optional hiredis parser for speed, and a multi-database client that fails over between Active-Active Redis deployments. The latest versions support Redis 7.2 and later, every CPython version that hasn't reached end of life, and PyPy.
Problems it solves
- connect to Redis from my Python app
- use Redis as a cache or queue from Python with asyncio
- talk to a Redis Cluster or Sentinel setup from Python
Features
- connection pools, pipelines and MULTI/EXEC transactions
- Pub/Sub through a separate PubSub class
- asyncio client, Redis Cluster and Sentinel support
- RESP3 protocol, the default since 8.0
- optional hiredis response parser
- multi-database client with failover between Active-Active deployments
Limitations
- PUBLISH can only be called from the Redis client, not from a PubSub instance1
