# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-redis VERSION= 3.3.7 KEYWORDS= python VARIANTS= py27 py36 py37 SDESC[py36]= Python client for Redis key-value store (PY 36) SDESC[py37]= Python client for Redis key-value store (PY 37) SDESC[py27]= Python client for Redis key-value store (PY 27) HOMEPAGE= https://github.com/andymccurdy/redis-py CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPI/r/redis DISTFILE[1]= redis-3.3.7.tar.gz:main DF_INDEX= 1 SPKGS[py36]= single SPKGS[py37]= single SPKGS[py27]= single OPTIONS_AVAILABLE= PY27 PY36 PY37 OPTIONS_STANDARD= none VOPTS[py36]= PY27=OFF PY36=ON PY37=OFF VOPTS[py37]= PY27=OFF PY36=OFF PY37=ON VOPTS[py27]= PY27=ON PY36=OFF PY37=OFF DISTNAME= redis-3.3.7 GENERATED= yes [PY36].USES_ON= python:py36 [PY37].USES_ON= python:py37 [PY27].USES_ON= python:py27 [FILE:3603:descriptions/desc.single] redis-py ======== The Python interface to the Redis key-value store. .. image:: https://secure.travis-ci.org/andymccurdy/redis-py.svg?branch=master :target: https://travis-ci.org/andymccurdy/redis-py .. image:: https://readthedocs.org/projects/redis-py/badge/?version=latest&style=flat :target: https://redis-py.readthedocs.io/en/latest/ .. image:: https://badge.fury.io/py/redis.svg :target: https://pypi.org/project/redis/ .. image:: https://codecov.io/gh/andymccurdy/redis-py/branch/master/graph/badge.svg :target: https://codecov.io/gh/andymccurdy/redis-py Installation ------------ redis-py requires a running Redis server. See `Redis's quickstart `_ for installation instructions. redis-py can be installed using `pip` similar to other Python packages. Do not use `sudo` with `pip`. It is usually good to work in a `virtualenv `_ or `venv `_ to avoid conflicts with other package managers and Python projects. For a quick introduction see `Python Virtual Environments in Five Minutes `_. To install redis-py, simply: .. code-block:: bash $ pip install redis or from source: .. code-block:: bash $ python setup.py install Getting Started --------------- .. code-block:: pycon >>> import redis >>> r = redis.Redis(host='localhost', port=6379, db=0) >>> r.set('foo', 'bar') True >>> r.get('foo') 'bar' By default, all responses are returned as `bytes` in Python 3 and `str` in Python 2. The user is responsible for decoding to Python 3 strings or Python 2 unicode objects. If **all** string responses from a client should be decoded, the user can specify `decode_responses=True` to `Redis.__init__`. In this case, any Redis command that returns a string type will be decoded with the `encoding` specified. Upgrading from redis-py 2.X to 3.0 ---------------------------------- redis-py 3.0 introduces many new features but required a number of backwards incompatible changes to be made in the process. This section attempts to provide an upgrade path for users migrating from 2.X to 3.0. Python Version Support ^^^^^^^^^^^^^^^^^^^^^^ redis-py 3.0 now supports Python 2.7 and Python 3.4+. Python 2.6 and 3.3 support has been dropped. Client Classes: Redis and StrictRedis ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ redis-py 3.0 drops support for the legacy "Redis" client class. "StrictRedis" has been renamed to "Redis" and an alias named "StrictRedis" is provided so that users previously using "StrictRedis" can continue to run unchanged. The 2.X "Redis" class provided alternative implementations of a few commands. This confused users (rightfully so) and caused a number of support issues. To make things easier going forward, it was decided to drop support for these alternate implementations and instead focus on a single client class. 2.X users that are already using StrictRedis don't have to change the class name. StrictRedis will continue to work for the forseeable future. 2.X users that are using the Redis class will have to make changes if they use any of the following commands: * SETEX: The argument order has changed. The new order is (name, time, value). * LREM: The argument order has changed. The new order is (name, num, value). * TTL and PTTL: The return value is now always an int and matches the official Redis command (>0 indicates the timeout, -1 indicates that the key exists but that it has no expire time set, -2 indicates that the key does [FILE:97:distinfo] 9c96c5bf11a8c47eb33cefdefd41c47cf1ff68db41c51b56b3ec7938b7c627f7 130289 redis-3.3.7.tar.gz