Find file
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (36 sloc) 1.26 KB


This is an example of using django and gevent-socketio to build a chat application using redis as the backend.


Note: you probably want to create and activate a virtualenv before installing the requirements below. I use and like virtualenvwrapper.

git clone git://
cd django-gevent-socketio-redis-chat-example
pip install -r requirements.txt


Start the gevent socketio server:

cd chatproject
./ run_gevent 9000

Then point your browser to http://localhost:9000/.


  • I have noticed weird things happen in cases where multiple clients are connecting at same time. Race conditions?


  • Connected users list
  • Chat rooms
  • Private/1:1 chat
  • Experiment posting messages outside of connection. This way we can limit the connection to pubsub messages and all blocking calls (to database, etc.) can be made through the normal django/wsgi stack.