Redis PyPI
Redis PyPI
2025 Python Packaging Survey is now live! Take the survey now
Search projects
Verified details Note: redis-py 5.0 will be the last version of redis-py
These details have been
verified by PyPI
to support Python 3.7, as it has reached end of life.
redis-py 5.1 will support Python 3.8+. Note: redis-
Maintainers
py 6.1.0 will be the last version of redis-py to
cisk support Python 3.8, as it has reached end of life.
redis-py 6.2.0 will support Python 3.9+.
https://pypi.org/project/redis/ 1/8
6/3/25, 4:15 PM redis · PyPI
Meta
License Start a redis via docker (for Redis versions < 8.0):
Expression: MIT
SPDX License
Expression docker run -p 6379:6379 -it redis/redis-stack:latest
Author: Redis
Inc. To install redis-py, simply:
Redis,
``` bash
database, key-
$ pip install redis
value-store
Requires: Python
>=3.9 For faster performance, install redis with hiredis support, this
Provides-Extra: provides a compiled response parser, and for most cases requires
hiredis , jwt , zero code changes. By default, if hiredis >= 1.0 is available, redis-py
ocsp will attempt to use it for response parsing.
https://pypi.org/project/redis/ 2/8
6/3/25, 4:15 PM redis · PyPI
License The most recent version of this library supports Redis version 7.2, 7.4
2025
OSI Approved ::
Python Packaging
and 8.0. Survey is now live! Take the survey now
MIT License
The table below highlights version compatibility of the most-recent
Operating System library versions and redis versions.
OS Independent
Programming
Library version Supported redis versions
Language
Python
3.5.3 <= 6.2 Family of releases
Python :: 3
Python :: 3 :: Only
>= 4.5.0 Version 5.0 to 7.0
Python :: 3.9
Python :: 3.10
>= 5.0.0 Version 5.0 to 7.4
Python :: 3.11
Python :: 3.12
Python :: 3.13 >= 6.0.0 Version 7.2 to current
Python ::
Implementation ::
CPython Usage
Python ::
Implementation :: Basic Example
PyPy
PSF Sponsor · Served The above code connects to localhost on port 6379, sets a value in
ethically Redis, and retrieves it. All responses are returned as bytes in Python,
to receive decoded strings, set decode_responses=True. For this, and
more connection options, see these examples.
Report project as
malware RESP3 Support
To enable support for RESP3, ensure you have at least version 5.0 of
the client, and change your connection object to include protocol=3
https://pypi.org/project/redis/ 3/8
6/3/25, 4:15 PM redis · PyPI
Connection Pools
Redis Commands
Advanced Topics
and listen for messages. You can only call PUBLISH from the
2025 Python Packaging Survey
Redis client is now
(see this live! onTake
comment the #151
issue surveyfor
nowdetails).
Pipelines
PubSub
>>> r = redis.Redis(...)
>>> p = r.pubsub()
>>> p.subscribe('my-first-channel', 'my-second-channel
>>> p.get_message()
{'pattern': None, 'type': 'subscribe', 'channel': b'my-
Author
Redis
https://pypi.org/project/redis/ 6/8
6/3/25, 4:15 PM redis · PyPI
2025 Python Packaging Survey is now live! Take the survey now
English español français 日本語 português (Brasil) українська Ελληνικά Deutsch 中文 (简体)
中文 (繁體) русский עבריתEsperanto 한국어
https://pypi.org/project/redis/ 7/8
6/3/25, 4:15 PM redis · PyPI
2025 Python Packaging Survey is now live! Take the survey now
AWS Pingdom
Cloud computing
Datadog Fastly Google
and Security
Sponsor Monitoring CDN Download Analytics Monitoring
Sentry StatusPage
Error logging Status page
https://pypi.org/project/redis/ 8/8