File: examples.rst

package info (click to toggle)
aioredis 1.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 1,104 kB
  • sloc: python: 11,112; makefile: 7
file content (65 lines) | stat: -rw-r--r-- 1,277 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
Examples of aioredis usage
==========================

Below is a list of examples from `aioredis/examples
<https://github.com/aio-libs/aioredis/tree/master/examples>`_
(see for more).

Every example is a correct python program that can be executed.


Commands example
~~~~~~~~~~~~~~~~

:download:`get source code<../examples/commands.py>`

.. literalinclude:: ../examples/commands.py


Transaction example
~~~~~~~~~~~~~~~~~~~

:download:`get source code<../examples/transaction.py>`

.. literalinclude:: ../examples/transaction.py


Pub/Sub example
~~~~~~~~~~~~~~~

:download:`get source code<../examples/pubsub.py>`

.. literalinclude:: ../examples/pubsub.py


Scan command example
~~~~~~~~~~~~~~~~~~~~

:download:`get source code<../examples/scan.py>`

.. literalinclude:: ../examples/scan.py


Sentinel client
~~~~~~~~~~~~~~~

:download:`get source code<../examples/sentinel.py>`

.. literalinclude:: ../examples/sentinel.py

.. _aioredis-examples-simple:

Low-level connection usage example
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:download:`get source code<../examples/connection.py>`

.. literalinclude:: ../examples/connection.py


Connections pool example
~~~~~~~~~~~~~~~~~~~~~~~~

:download:`get source code<../examples/pool.py>`

.. literalinclude:: ../examples/pool.py