Skip to main content

Reference ASGI adapters and channel layers

Project description

https://api.travis-ci.org/andrewgodwin/asgiref.svg https://img.shields.io/pypi/v/asgiref.svg

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asgiref-0.13.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

asgiref-0.13.0-py2.py3-none-any.whl (12.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file asgiref-0.13.0.tar.gz.

File metadata

  • Download URL: asgiref-0.13.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for asgiref-0.13.0.tar.gz
Algorithm Hash digest
SHA256 47b72ba687c18103e0c7e2914c55d1f81d2e380955b9ed78b453bc19347bec88
MD5 27634fb9b9ff4a222873bc24cd8ae883
BLAKE2b-256 6f63f038c7c63d52f07b2d68ad8d003fe3c6e64cdc5ad833418bfb52755bbbdd

See more details on using hashes here.

File details

Details for the file asgiref-0.13.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for asgiref-0.13.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e1ee297f1e8bd3a1618b4398d448a8632ff164e27e3ff4208879c426da2648b4
MD5 c41bd0b520a163720141db2072c7dc08
BLAKE2b-256 dc4140dc641061f7ccd00d9a99e17156ce00551724ca5892354e228f5637c96b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page