# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-redis VERSION= 5.2.1 KEYWORDS= python VARIANTS= v12 v13 SDESC[v12]= Redis database and key-value store client (3.12) SDESC[v13]= Redis database and key-value store client (3.13) HOMEPAGE= https://github.com/redis/redis-py CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/3c/5f/fa26b9b2672cbe30e07d9a5bdf39cf16e3b80b42916757c5f92bca88e4ba DISTFILE[1]= redis-5.2.1-py3-none-any.whl:main DIST_SUBDIR= python-src DF_INDEX= 1 SPKGS[v12]= single SPKGS[v13]= single OPTIONS_AVAILABLE= PY312 PY313 OPTIONS_STANDARD= none VOPTS[v12]= PY312=ON PY313=OFF VOPTS[v13]= PY312=OFF PY313=ON DISTNAME= redis-5.2.1.dist-info GENERATED= yes [PY312].RUN_DEPENDS_ON= python-async-timeout:single:v12 [PY312].USES_ON= python:v12,wheel [PY313].RUN_DEPENDS_ON= python-async-timeout:single:v13 [PY313].USES_ON= python:v13,wheel [FILE:2325:descriptions/desc.single] # redis-py The Python interface to the Redis key-value store. [CI] [docs] [MIT licensed] [pypi] [![pre-release]](https://github.com/redis/redis-py/releases) [codecov] [Installation] | [Usage] | [Advanced Topics] | [Contributing] --------------------------------------------- **Note: ** redis-py 5.0 will be the last version of redis-py to support Python 3.7, as it has reached [end of life]. redis-py 5.1 will support Python 3.8+. --------------------------------------------- ## How do I Redis? [Learn for free at Redis University] [Try the Redis Cloud] [Dive in developer tutorials] [Join the Redis community] [Work at Redis] ## Installation Start a redis via docker: ``` bash docker run -p 6379:6379 -it redis/redis-stack:latest ``` To install redis-py, simply: ``` bash $ pip install redis ``` For faster performance, install redis with hiredis support, this provides a compiled response parser, and *for most cases* requires zero code changes. By default, if hiredis >= 1.0 is available, redis-py will attempt to use it for response parsing. ``` bash $ pip install "redis[hiredis]" ``` Looking for a high-level library to handle object mapping? See [redis-om-python]! ## Supported Redis Versions The most recent version of this library supports redis version [5.0], [6.0], [6.2], [7.0], [7.2] and [7.4]. The table below highlights version compatibility of the most-recent library versions and redis versions. | Library version | Supported redis versions | |-----------------|-------------------| | 3.5.3 | <= 6.2 Family of releases | | >= 4.5.0 | Version 5.0 to 7.0 | | >= 5.0.0 | Version 5.0 to current | ## Usage ### Basic Example ``` python >>> import redis >>> r = redis.Redis(host='localhost', port=6379, db=0) >>> r.set('foo', 'bar') True >>> r.get('foo') b'bar' ``` The above code connects to localhost on port 6379, sets a value in 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]. #### 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* ``` python >>> import redis >>> r = redis.Redis(host='localhost', port=6379, db=0, protocol=3) ``` [FILE:118:distinfo] ee7e1056b9aea0f04c6c2ed59452947f34c4940ee025f5dd83e6a6418b6989e4 261502 python-src/redis-5.2.1-py3-none-any.whl