Navigate:
redis-py
~$REDI0.1%

Official Python Client for Redis Database

High-performance Python Redis client with clustering, pipelines, and async operation support.

LIVE RANKINGS • 10:20 AM • STEADY
OVERALL
#377
20
BACKEND & APIS
#19
1
30 DAY RANKING TREND
ovr#377
·Backe#19
STARS
13.5K
FORKS
2.7K
7D STARS
+10
7D FORKS
+7
See Repo:
Share:

Learn more about redis-py

redis-py is the official Python client library for Redis, providing both synchronous and asynchronous interfaces to interact with Redis servers. It supports all Redis commands and features including clustering, pub/sub messaging, Lua scripting, transactions, pipelines, and connection pooling. The library offers robust error handling, automatic reconnection capabilities, and comprehensive support for Redis data structures like strings, hashes, lists, sets, sorted sets, streams, and geospatial indexes. Built with performance in mind, it includes native support for connection multiplexing, response parsing optimization, and both standalone and cluster deployment modes. redis-py serves as the foundation for Python applications requiring fast in-memory caching, session management, real-time analytics, message queuing, and distributed locking mechanisms.

redis-py

1

Complete Redis Command Coverage

Implements the full Redis command set with native Python data type mappings, automatically handling serialization and deserialization. Supports all modern Redis features including Redis Streams, JSON, Search, TimeSeries, and Graph modules. Regular updates ensure compatibility with the latest Redis versions and new commands as they're released.

2

Async and Sync APIs

Provides both synchronous and asynchronous client implementations, enabling developers to choose the best approach for their application architecture. The async client leverages Python's asyncio for non-blocking I/O operations, perfect for high-concurrency applications, while the sync client offers simplicity for traditional blocking workloads.

3

Production-Ready Clustering Support

Features built-in Redis Cluster support with automatic node discovery, hash slot calculation, and failover handling. Includes connection pooling, retry logic, and intelligent request routing across cluster nodes. Handles cluster topology changes transparently, making it ideal for scaling Redis deployments horizontally in production environments.


import redis

r = redis.Redis(host='localhost', port=6379, decode_responses=True)

r.set('user:1000:name', 'Alice Johnson')
name = r.get('user:1000:name')

r.setex('session:abc123', 3600, 'active')
ttl = r.ttl('session:abc123')

vv7.1.1

This release introduces experimental health check policies and improves MultiDBClient functionality with better logging and configuration changes.

  • Added initial health check policies, refactored add_database method
  • Disabled SCH in MultiDBClient underlying clients by default
  • Added logging for MultiDBClients
vv7.1.0

Redis-py v7.1.0 adds new Redis commands (MSETEX, XREADGROUP CLAIM), experimental CAS/CAD and HYBRID search support, drops Python 3.9 support.

  • Adding MSETEX command support.
  • Adding CLAIM option to XREADGROUP command + unit tests
  • Apply routing and response aggregation policies in OSS Cluster mode
  • Adding support for CAS/CAD commands.
  • Adding support for HYBRID search.
vv7.0.1

This release focuses on improving documentation for the multi-database client functionality with various documentation updates and additions.

  • Add 'multi_database' section to documentation index
  • Revised multi-database client documentation
  • Adding info about Multi-database client in README.md


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers