|
6 | 6 | Welcome to redis-py's documentation!
|
7 | 7 | ====================================
|
8 | 8 |
|
9 |
| -Indices and tables |
10 |
| ------------------- |
| 9 | +Getting Started |
| 10 | +**************** |
11 | 11 |
|
12 |
| -* :ref:`genindex` |
13 |
| -* :ref:`modindex` |
14 |
| -* :ref:`search` |
| 12 | +`redis-py <https://pypi.org/project/redis>`_ requires a running Redis server, and Python 3.6+. See the `Redis |
| 13 | +quickstart <https://redis.io/topics/quickstart>`_ for Redis installation instructions. |
15 | 14 |
|
16 |
| -Contents: |
17 |
| ---------- |
| 15 | +redis-py can be installed using pip via ``pip install redis``. |
| 16 | + |
| 17 | + |
| 18 | +Quickly connecting to redis |
| 19 | +************ |
| 20 | + |
| 21 | +There are two quick ways to connect to Redis. |
| 22 | + |
| 23 | +Assuming you run Redis on localhost:6379 (the default):: |
| 24 | + import redis |
| 25 | + r = redis.Redis() |
| 26 | + r.ping() |
| 27 | + |
| 28 | +Running redis on foo.bar.com, port 12345:: |
| 29 | + import redis |
| 30 | + r = redis.Redis(host='foo.bar.com', port=12345) |
| 31 | + r.ping() |
| 32 | + |
| 33 | +Another example with foo.bar.com, port 12345:: |
| 34 | + import redis |
| 35 | + r = redis.from_url('redis://foo.bar.com:12345') |
| 36 | + r.ping() |
| 37 | + |
| 38 | +After that, you probably want to `run redis commands <redis_core_commands.html>`_. |
18 | 39 |
|
19 | 40 | .. toctree::
|
20 |
| - :maxdepth: 2 |
| 41 | + :hidden: |
| 42 | + |
| 43 | + genindex |
21 | 44 |
|
22 |
| -.. automodule:: redis |
23 |
| - :members: |
| 45 | +Redis Command Functions |
| 46 | +*********************** |
| 47 | +.. toctree:: |
| 48 | + :maxdepth: 2 |
24 | 49 |
|
25 |
| -.. automodule:: redis.backoff |
26 |
| - :members: |
| 50 | + redis_core_commands |
| 51 | + sentinel_commands |
| 52 | + redismodules |
27 | 53 |
|
28 |
| -.. automodule:: redis.connection |
29 |
| - :members: |
| 54 | +Module Documentation |
| 55 | +******************** |
| 56 | +.. toctree:: |
| 57 | + :maxdepth: 1 |
30 | 58 |
|
31 |
| -.. automodule:: redis.commands |
32 |
| - :members: |
| 59 | + backoff |
| 60 | + connections |
| 61 | + exceptions |
| 62 | + lock |
| 63 | + retry |
33 | 64 |
|
34 |
| -.. automodule:: redis.exceptions |
35 |
| - :members: |
| 65 | +Contributing |
| 66 | +************* |
36 | 67 |
|
37 |
| -.. automodule:: redis.lock |
38 |
| - :members: |
| 68 | +- `How to contribute <https://github.com/redis/redis-py/blob/master/CONTRIBUTING.md>`_ |
| 69 | +- `Issue Tracker <https://github.com/redis/redis-py/issues>`_ |
| 70 | +- `Source Code <https://github.com/redis/redis-py/>`_ |
| 71 | +- `Release History <https://github.com/redis/redis-py/releases/>`_ |
39 | 72 |
|
40 |
| -.. automodule:: redis.sentinel |
41 |
| - :members: |
| 73 | +License |
| 74 | +******* |
42 | 75 |
|
| 76 | +This projectis licensed under the `MIT license <https://github.com/redis/redis-py/blob/master/LICENSE>`_. |
0 commit comments