Files
deb-python-autobahn/doc/examples.rst
2014-04-11 15:39:10 +02:00

8.5 KiB

Overview of Examples

The examples give an overview of the features of by providing working code.

Read, run, and modify as you like!

Note

Most examples provide HTML clients and/or JavaScript versions of the Python code. JavaScript code for WAMP v2 runs both in the browser and in Node.js.

WebSocket

provides WebSocket both under Twisted and asyncio.

Basic Examples

Additional Examples (Twisted only)

WAMP v2

Publish & Subscribe (PubSub)

Remote Procedure Calls (RPC)

  • Time Service Twisted - asyncio - A trivial time service - demonstrates basic remote procedure feature.
  • Slow Square Twisted - asyncio - Demonstrates procedures which return promises and return asynchronously.
  • Arguments Twisted - asyncio - Demonstrates all variants of call arguments.
  • Complex Result Twisted - asyncio - Demonstrates complex call results (call results with more than one positional or keyword results).
  • Errors Twisted - asyncio - Demonstrates error raising and catching over remote procedures.
  • Progressive Results Twisted - asyncio - Demonstrates calling remote procedures that produce progressive results.
  • Options Twisted - asyncio - Using options with RPC.

WAMP v1

Examples demonstrating specific features:

Publish & Subscribe

Remote Procedure Calls

Authentication

and small example apps