redis-py is a Python client library for connecting to and interacting with Redis key-value stores.
The library solves the problem of communicating with Redis servers from Python applications. It provides a straightforward interface for executing Redis commands, handling the protocol details transparently. The client supports both synchronous operations and can work with different Redis protocol versions, including RESP3 support starting from version 5.0, with RESP3 becoming the default wire protocol in version 8.0 while maintaining backward compatibility with existing code through legacy response shapes.
Developers should choose redis-py if they need direct access to Redis commands from Python without additional abstraction layers. It suits projects ranging from simple caching scenarios to complex data structure operations. For applications requiring object mapping and higher-level abstractions, the README points to redis-om-python as an alternative. The library supports a wide range of Redis versions and offers optional performance improvements through hiredis integration, which provides a compiled response parser that typically requires no code changes when available.
The project maintains active support across multiple Python versions, dropping support for end-of-life Python releases in coordinated version updates. Development includes regular updates to align with new Redis server releases, as evidenced by support for multiple recent Redis versions. The tool provides comprehensive documentation and examples covering basic usage through advanced topics, with clear guidance on connection options and protocol configuration.