.. redis-py documentation master file, created by sphinx-quickstart on Thu Jul 28 13:55:57 2011. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to redis-py's documentation! ==================================== Getting Started **************** `redis-py `_ requires a running Redis server, and Python 3.6+. See the `Redis quickstart `_ for Redis installation instructions. redis-py can be installed using pip via ``pip install redis``. Quickly connecting to redis *************************** There are two quick ways to connect to Redis. **Assuming you run Redis on localhost:6379 (the default)** .. code-block:: python import redis r = redis.Redis() r.ping() **Running redis on foo.bar.com, port 12345** .. code-block:: python import redis r = redis.Redis(host='foo.bar.com', port=12345) r.ping() **Another example with foo.bar.com, port 12345** .. code-block:: python import redis r = redis.from_url('redis://foo.bar.com:12345') r.ping() After that, you probably want to `run redis commands `_. .. toctree:: :hidden: genindex Redis Command Functions *********************** .. toctree:: :maxdepth: 2 redis_commands redis_cluster_commands sentinel_commands redismodules Module Documentation ******************** .. toctree:: :maxdepth: 1 backoff connections exceptions lock retry Contributing ************* - `How to contribute `_ - `Issue Tracker `_ - `Source Code `_ - `Release History `_ License ******* This projectis licensed under the `MIT license `_.