Skip to main content

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


Download files

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

Source Distribution

asgi_amqp-1.0.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asgi_amqp-1.0.3-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file asgi_amqp-1.0.3.tar.gz.

File metadata

  • Download URL: asgi_amqp-1.0.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for asgi_amqp-1.0.3.tar.gz
Algorithm Hash digest
SHA256 127cc34b5dca6e11799b1ea6c50913329d72406c9d2441a5d2d46a2ea9a7ae68
MD5 7d810dffefd76be61fa63f23b620460b
BLAKE2b-256 cf507bd1f49e9ae8cfd55163ee4d22a1a81f4e54035c064c5b7117c8b5c8819b

See more details on using hashes here.

File details

Details for the file asgi_amqp-1.0.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for asgi_amqp-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 944f4edf3dfcb84eedb677023ffc91f1d3916d130957aec8c07cda777733cef7
MD5 f37a05ffcf8bafae4ae11c8797a0b0d3
BLAKE2b-256 9708ab9475c342c23e202dc5a0020ad16a375c6afc70ee7a8cb0c03be771eff7

See more details on using hashes here.

Supported by

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