This is the client used to connect directly to a standard Redis node.
redis.Redis
Redis Sentinel provides high availability for Redis. There are commands that can only be executed against a Redis node running in sentinel mode. Connecting to those nodes, and executing commands against them requires a Sentinel connection.
Connection example (assumes Redis exists on the ports listed below):
>>> from redis import Sentinel >>> sentinel = Sentinel([('localhost', 26379)], socket_timeout=0.1) >>> sentinel.discover_master('mymaster') ('127.0.0.1', 6379) >>> sentinel.discover_slaves('mymaster') [('127.0.0.1', 6380)]
redis.sentinel.Sentinel
redis.sentinel.SentinelConnectionPool
This client is used for connecting to a Redis Cluster.
redis.cluster.RedisCluster
redis.cluster.ClusterNode
See complete example: here
This client is used for communicating with Redis, asynchronously.
redis.asyncio.client.Redis
redis.asyncio.cluster.RedisCluster
redis.asyncio.cluster.ClusterNode
redis.asyncio.cluster.ClusterPipeline
See complete example: here
redis.connection.Connection
redis.asyncio.connection.Connection
See complete example: here
redis.connection.ConnectionPool
redis.asyncio.connection.ConnectionPool