Ravenports generated: 12 Feb 2024 04:56
[ravenports.git] / bucket_F0 / python-redis
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-redis
4 VERSION=                5.0.1
5 KEYWORDS=               python
6 VARIANTS=               v11 v12
7 SDESC[v11]=             Redis database and key-value store client (3.11)
8 SDESC[v12]=             Redis database and key-value store client (3.12)
9 HOMEPAGE=               https://github.com/redis/redis-py
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPIWHL/0b/34/a01250ac1fc9bf9161e07956d2d580413106ce02d5591470130a25c599e3
14 DISTFILE[1]=            redis-5.0.1-py3-none-any.whl:main
15 DF_INDEX=               1
16 SPKGS[v11]=             single
17 SPKGS[v12]=             single
18
19 OPTIONS_AVAILABLE=      PY311 PY312
20 OPTIONS_STANDARD=       none
21 VOPTS[v11]=             PY311=ON PY312=OFF
22 VOPTS[v12]=             PY311=OFF PY312=ON
23
24 DISTNAME=               redis-5.0.1.dist-info
25
26 GENERATED=              yes
27
28 [PY311].RUN_DEPENDS_ON=                 python-async-timeout:single:v11
29 [PY311].USES_ON=                        python:v11,wheel
30
31 [PY312].RUN_DEPENDS_ON=                 python-async-timeout:single:v12
32 [PY312].USES_ON=                        python:v12,wheel
33
34 [FILE:2571:descriptions/desc.single]
35 # redis-py
36
37 The Python interface to the Redis key-value store.
38
39 [CI]
40 [docs]
41 [MIT licensed]
42 [pypi]
43 [![pre-release]](https://github.com/redis/redis-py/releases)
44 [codecov]
45
46 [Installation] |  [Usage] | [Advanced Topics] | [Contributing]
47
48 ---------------------------------------------
49
50 **Note: ** redis-py 5.0 will be the last version of redis-py to support
51 Python 3.7, as it has reached [end of life]. redis-py 5.1 will support
52 Python 3.8+.
53
54 ---------------------------------------------
55
56 ## Installation
57
58 Start a redis via docker:
59
60 ``` bash
61 docker run -p 6379:6379 -it redis/redis-stack:latest
62 ```
63
64 To install redis-py, simply:
65
66 ``` bash
67 $ pip install redis
68 ```
69
70 For faster performance, install redis with hiredis support, this provides a
71 compiled response parser, and *for most cases* requires zero code changes.
72 By default, if hiredis >= 1.0 is available, redis-py will attempt to use it
73 for response parsing.
74
75 ``` bash
76 $ pip install "redis[hiredis]"
77 ```
78
79 Looking for a high-level library to handle object mapping? See
80 [redis-om-python]!
81
82 ## Supported Redis Versions
83
84 The most recent version of this library supports redis version [5.0],
85 [6.0], [6.2], [7.0] and [7.2].
86
87 The table below highlights version compatibility of the most-recent library
88 versions and redis versions.
89
90 | Library version | Supported redis versions |
91 |-----------------|-------------------|
92 | 3.5.3 | <= 6.2 Family of releases |
93 | >= 4.5.0 | Version 5.0 to 7.0 |
94 | >= 5.0.0 | Version 5.0 to current |
95
96 ## Usage
97
98 ### Basic Example
99
100 ``` python
101 >>> import redis
102 >>> r = redis.Redis(host='localhost', port=6379, db=0)
103 >>> r.set('foo', 'bar')
104 True
105 >>> r.get('foo')
106 b'bar'
107 ```
108
109 The above code connects to localhost on port 6379, sets a value in Redis,
110 and retrieves it. All responses are returned as bytes in Python, to receive
111 decoded strings, set *decode_responses=True*.  For this, and more
112 connection options, see [these examples].
113
114 #### RESP3 Support
115 To enable support for RESP3, ensure you have at least version 5.0 of the
116 client, and change your connection object to include *protocol=3*
117
118 ``` python
119 >>> import redis
120 >>> r = redis.Redis(host='localhost', port=6379, db=0, protocol=3)
121 ```
122
123 ### Connection Pools
124
125 By default, redis-py uses a connection pool to manage connections. Each
126 instance of a Redis class receives its own connection pool. You can however
127 define your own [redis.ConnectionPool].
128
129 ``` python
130 >>> pool = redis.ConnectionPool(host='localhost', port=6379, db=0)
131 >>> r = redis.Redis(connection_pool=pool)
132 ```
133
134 Alternatively, you might want to look at [Async connections], or [Cluster
135
136
137 [FILE:107:distinfo]
138 ed4802971884ae19d640775ba3b03aa2e7bd5e8fb8dfaed2decce4d0fc48391f       250272 redis-5.0.1-py3-none-any.whl
139