Reference ASGI adapters and channel layers
Project description
Contains various reference ASGI implementations, including:
A base channel layer, asgiref.base_layer
An in-memory channel layer, asgiref.inmemory
WSGI-to-ASGI and ASGI-to-WSGI adapters, in asgiref.wsgi
Base Channel Layer
Provides an optional template to start ASGI channel layers from with the two exceptions you need provided and all API functions stubbed out.
Also comes with logic for doing per-channel capacities using channel names and globbing; use self.get_capacity and pass the arguments through to the base __init__ if you want to use it.
In-memory Channel Layer
Simply instantiate asgiref.inmemory.ChannelLayer, or use the pre-made asgiref.inmemory.channel_layer for easy use. Implements the group extension, and is designed to support running multiple ASGI programs in separate threads within one process (the channel layer is threadsafe).
WSGI-ASGI Adapters
These are not yet complete and should not be used.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for asgiref-0.14.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c30206bb66d83d8f941c0a21661e21676fdb3f3994d85787da794f6aa78dcbd |
|
MD5 | 4ed35213a178783192a37387ae99ae5c |
|
BLAKE2b-256 | 11363301407c337fca6c2c619e64e937f3ac4281ea381dae942e0f9888a437a1 |