RabbitMQ backend for ASGI
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
asgi_rabbitmq
compose
docs
libs
requirements
tests
.gitignore
.travis.yml
CHANGELOG.rst
LICENSE
MANIFEST.in
README.rst
docker-compose.yml
pytest.ini
setup.py This is 0.5.5 Dec 1, 2017
tox.ini

README.rst

asgi_rabbitmq

Build Status Coverage Status

RabbitMQ backend for ASGI.

ASGI is a standard interface between network protocol servers (particularly web servers) and Python applications (Django Channels), intended to allow handling of multiple common protocol styles (including HTTP, HTTP2, and WebSocket).

Channels loads into Django as a pluggable app to bring WebSocket, long-poll HTTP, task offloading and other asynchrony support to your code, using familiar Django design patterns and a flexible underlying framework that lets you not only customize behaviours but also write support for your own protocols and needs.

docs/img/infrastructure.png

Installation

You can install the most recent available version from PyPI:

pip install asgi_rabbitmq

Usage

To use RabbitMQ broker as your channels layer add following lines to your django settings

CHANNEL_LAYERS = {
    'default': {
        'BACKEND': 'asgi_rabbitmq.RabbitmqChannelLayer',
        # Change according to your project layout:
        'ROUTING': 'myproject.routing.routes',
        'CONFIG': {
            'url': 'amqp://guest:guest@rabbitmq:5672/%2F',
        },
    },
}

Now you can use channels project as usual:

daphne myproject.asgi:channel_layer
django-admin runworker

License

ASGI RabbitMQ layer is offered under 3-terms BSD license.