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
