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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
Examples of aiozmq usage
========================
There is a list of examples from `aiozmq/examples <https://github.com/aio-libs/aiozmq/tree/master/examples>`_
Every example is a correct tiny python program.
.. _aiozmq-examples-core-dealer-router:
Simple DEALER-ROUTER pair implemented on Core level
---------------------------------------------------
.. literalinclude:: ../examples/core_dealer_router.py
.. _aiozmq-examples-stream-dealer-router:
DEALER-ROUTER pair implemented with streams
-------------------------------------------
.. literalinclude:: ../examples/stream_dealer_router.py
.. _aiozmq-examples-rpc-rpc:
Remote Procedure Call
---------------------
.. literalinclude:: ../examples/rpc_simple.py
.. _aiozmq-examples-rpc-pipeline:
Pipeline aka Notifier
---------------------
.. literalinclude:: ../examples/rpc_pipeline.py
.. _aiozmq-examples-rpc-pubsub:
Publish-Subscribe
-----------------
.. literalinclude:: ../examples/rpc_pubsub.py
.. _aiozmq-examples-rpc-exception-trasnslator:
Translation RPC exceptions back to client
-----------------------------------------
.. literalinclude:: ../examples/rpc_exception_translator.py
.. _aiozmq-examples-rpc-custom-value-trasnslator:
Translation instances of custom classes via RPC
------------------------------------------------
.. literalinclude:: ../examples/rpc_custom_translator.py
.. _aiozmq-examples-rpc-incorrect-calls:
Validation of RPC methods
--------------------------
.. literalinclude:: ../examples/rpc_incorrect_calls.py
.. _aiozmq-examples-rpc-subhandlers:
RPC lookup in nested namespaces
-------------------------------
.. literalinclude:: ../examples/rpc_with_subhandlers.py
.. _aiozmq-examples-rpc-dict-handler:
Use dict as RPC lookup table
----------------------------
.. literalinclude:: ../examples/rpc_dict_handler.py
.. _aiozmq-examples-rpc-dynamic-handler:
Use dynamic RPC lookup
----------------------
.. literalinclude:: ../examples/rpc_dynamic.py
.. _aiozmq-examples-socket-event-monitor:
Socket event monitor
--------------------
.. literalinclude:: ../examples/socket_event_monitor.py
.. _aiozmq-examples-stream-socket-event-monitor:
Stream socket event monitor
---------------------------
.. literalinclude:: ../examples/stream_monitor.py
.. _aiozmq-examples-sync-async:
Synchronous and asynchronous code works together
-------------------------------------------------
.. literalinclude:: ../examples/sync_async.py
|