Python microframework (Bottle, Flask) and socket.io

Question:

I’m trying to build an application with a websocket like functionality
I’m using python (will be deployed on heroku with gunicorn)

So far my search led me to Bottle. A replacement for my current microframework – Flask.
Bottle allows websocket functionality. http://bottlepy.org/docs/stable/async.html

My question is: Could I use the javascript part of socket.io (or something similar) to connect to Bottle? If yes, how?

Thank you.

Asked By: Anton

||

Answers:

If you really want to get started, take a look at the examples in here:

There’s also a bottle example up here:

You might want to start with the documentation at this address:

Hope this helps 🙂

Answered By: abourget

You can also take a look at flask-socket.io, which would work with your current framework — Flask. Aside from wrapping the lower-level functionality (gevent/SocketIO), it also adds some higher level functions such as rooms so you can group your users together.

Served me well on a previous project.

Answered By: Jan Benes
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.