File: index.rst

package info (click to toggle)
python-redis 6.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,432 kB
  • sloc: python: 60,318; sh: 179; makefile: 128
file content (90 lines) | stat: -rw-r--r-- 2,002 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
.. 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.

redis-py - Python Client for Redis
====================================

Getting Started
****************

`redis-py <https://pypi.org/project/redis>`_ requires a running Redis server, and Python 3.7+. See the `Redis
quickstart <https://redis.io/topics/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 <commands.html>`_.

.. toctree::
   :hidden:

   genindex

Redis Command Functions
***********************
.. toctree::
   :maxdepth: 2

   commands
   redismodules

Module Documentation
********************
.. toctree::
   :maxdepth: 1

   connections
   clustering
   exceptions
   backoff
   lock
   retry
   lua_scripting
   opentelemetry
   resp3_features
   advanced_features
   examples

Contributing
*************

- `How to contribute <https://github.com/redis/redis-py/blob/master/CONTRIBUTING.md>`_
- `Issue Tracker <https://github.com/redis/redis-py/issues>`_
- `Source Code <https://github.com/redis/redis-py/>`_
- `Release History <https://github.com/redis/redis-py/releases/>`_

License
*******

This project is licensed under the `MIT license <https://github.com/redis/redis-py/blob/master/LICENSE>`_.