HEX
Server: Apache
System: Linux beluga.o2switch.net 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP Thu May 7 23:17:13 UTC 2026 x86_64
User: sc3naki1272 (1113)
PHP: 8.3.33
Disabled: NONE
Upload Files
File: //opt/alt/python35/share/doc/alt-python35-aioredis/docs/examples.rst
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.

.. _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


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