Tornado WebSocket server backed with PikaClient connected on RabbitMQ.
The goal of this architecture is to provide a way to integrate full duplex websockets in synchronous application with RabbitMQ as message bus.
Server is Tornado WebSocketHandler with a PikaClient consumer.
Installation
git clone https://github.com/toxinu/django-bagou.git cd django-bagou/example virtualenv virtenv source virtenv/source/activate pip install django pip install -e .. python manage.py runserver # In another terminal python manage.py runwebsocket # Go to http://localhost:8000
Incoming
For example, incoming websocket messages from Tornado are pushed to a queue (Celery for example) or just computed.
Browser send websocket message
Tornado received it * Sending AMQP message * Run Celery task (from Django?)
Torndo reply to websocket
Browser received websocket message
Sending
Django application can publish messages on RabbitMQ, which will be consumed by Pika and pushed to websockets.
Running arbitary Python code
Send AMQP message to websocket queue
PikaClient wich run with Tornado consumed it
PikaClient tell Tornado to send websocket message to browser
Browser received websocket message
Todo
Channel permission
User authentification based on sessionid
Integrated with Celery ?
Helpers for getting channels
Metadata
Release files for django-bagou 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-bagou-0.1.1.tar.gz | 30.0 kB | Without provenance | Details |
Release files / django-bagou-0.1.1.tar.gz
| Download URL | django-bagou-0.1.1.tar.gz |
|---|---|
| Size | 30.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
304c5d51916e4aae2861a168da4713ef052d7001cbbe39c27f83f2e7cfba4697
|
|
BLAKE2b-256 checksum How to use checksums |
cdcd9c36f262d36d82a3fac3133d0de6eb61275a46ae0fff923f3b17981620e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Security for django-bagou 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.