AMQP-backed ASGI channel layer implementation
Project description
An ASGI channel layer that uses AMQP as its backing store with group support.
IMPORTANT
This library expects your Django project to have a model called ChannelGroup. You will need to fix the import of ChannelGroup in the code to make it work with your django project.
See an example here: https://github.com/ansible/awx/blob/devel/awx/main/models/channels.py
Eventually I make this part of the configuration options so you can just pass in project.model.MyModel in your settings.py file.
Example Model:
from django.db import models class ChannelGroup(models.Model): group = models.CharField(max_length=200, unique=True) channels = models.TextField()
Usage
You’ll need to instantiate the channel layer with at least url, and other options if you need them.
Example:
channel_layer = AMQPChannelLayer( url="amqp://guest:guest@localhost:5672//", } )
host
The server to connect to as a URL.
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 asgi_amqp-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d62140292e59ef44e1e35c1d28fc6fa65b65c48dcc2537a3119068935389d9f7 |
|
MD5 | 1cc47b91d668e933261ea20dc4cb6428 |
|
BLAKE2b-256 | 5e0532816edf27f16378fa2212042b06b85561c41d5dca07c8d0fdf30c4f908e |