autobahn.asyncio.wamp¶
Classes¶
This class is a convenience tool mainly for development and quick hosting |
|
WAMP application session for asyncio-based applications. |
|
WAMP application session factory for asyncio-based applications. |
Module Contents¶
- class ApplicationRunner(url, realm=None, extra=None, serializers=None, ssl=None, proxy=None, headers=None)[source]¶
Bases:
objectThis class is a convenience tool mainly for development and quick hosting of WAMP application components.
It can host a WAMP application component in a WAMP-over-WebSocket client connecting to a WAMP router.
- run(make, start_loop=True, log_level='info')[source]¶
Run the application component. Under the hood, this runs the event loop (unless start_loop=False is passed) so won’t return until the program is done.
- Parameters:
make (callable) – A factory that produces instances of
autobahn.asyncio.wamp.ApplicationSessionwhen called with an instance ofautobahn.wamp.types.ComponentConfig.start_loop (bool) – When
True(the default) this method start a new asyncio loop.
- Returns:
None is returned, unless you specify start_loop=False in which case the coroutine from calling loop.create_connection() is returned. This will yield the (transport, protocol) pair.
- class ApplicationSession(config: autobahn.wamp.types.ComponentConfig | None = None)[source]¶
Bases:
autobahn.wamp.protocol.ApplicationSessionWAMP application session for asyncio-based applications.
Implements:
autobahn.wamp.interfaces.ITransportHandlerautobahn.wamp.interfaces.ISession
- class ApplicationSessionFactory(config=None)[source]¶
Bases:
autobahn.wamp.protocol.ApplicationSessionFactoryWAMP application session factory for asyncio-based applications.
- session: ApplicationSession[source]¶
The application session class this application session factory will use. Defaults to
autobahn.asyncio.wamp.ApplicationSession.