Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Latest commit

 

History

History
114 lines (61 loc) · 2.24 KB

examples.rst

File metadata and controls

114 lines (61 loc) · 2.24 KB

Examples of aioredis usage

Below is a list of examples from aioredis/examples (see for more).

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

Python 3.5 examples

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


Python 3.4 examples (using yield from)

Located in aioredis/examples/py34

Low-level connection usage example

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

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


Connections pool example

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

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


Commands example

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

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


Transaction example

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

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


Pub/Sub example

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

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


Scan command example

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

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