skip to navigation
skip to content

Not Logged In

django-bagou 0.0.1

Django Websocket for Django

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.

Take a look at the simple demo chat.


git clone
cd django-bagou/example
virtualenv virtenv
source virtenv/source/activate
pip install django
pip install -e ..
python runserver
# In another terminal
python runwebsocket
# Go to http://localhost:8000


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


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


  • Channel permission
  • User authentification based on sessionid
  • Integrated with Celery ?
  • Helpers for getting channels
File Type Py Version Uploaded on Size
django-bagou-0.0.1.tar.gz (md5) Source 2013-12-30 43KB
  • Downloads (All Versions):
  • 44 downloads in the last day
  • 214 downloads in the last week
  • 396 downloads in the last month