4 ms·
What's the best option for using websockets with Python? WSGI doesn't support it (http://librelist.com/browser//flask/2010/9/1/flask-and-websockets/#c5cd3883a8
by curiouskat 15y ago
What's the best option for using websockets with Python?
WSGI doesn't support it (http://librelist.com/browser//flask/2010/9/1/flask-and-websockets/#c5cd3883a8012c672792106000e11c63 http://librelist.com/browser//flask/2010/9/1/flask-and-webso...). gevent is an option (http://blog.pythonisito.com/2011/07/gevent-zeromq-websockets-and-flot-ftw.html http://blog.pythonisito.com/2011/07/gevent-zeromq-websockets...), but would something like Mongrel2 be better (http://mongrel2.org/ http://mongrel2.org/)?
UPDATE: There's also Juggernaut (http://flask.pocoo.org/snippets/80/ http://flask.pocoo.org/snippets/80/), which uses node.js under the hood.
- twism 15y agoI have had a lot of success with Tornado ... http://www.tornadoweb.org/documentation/websocket.html http://www.tornadoweb.org/documentation/websocket.html
- stuartk 15y ago+1 for tornado. And I also use Tornadio, which implements the backend for Socket.io.
- zaphoyd 15y agohttps://github.com/oberstet/Autobahn https://github.com/oberstet/Autobahn is another option
- theturtle32 15y agoAutoBahn is an absolutely top notch implementation of WebSockets for twisted. It's probably one of the most complete and robust implementations on any platform, and their test suite is currently the gold standard against which other implementors test their own implementations.
- hackforlife 15y agohttps://github.com/MostAwesomeDude/txWS https://github.com/MostAwesomeDude/txWS Twisted gives you the foundation for pretty amazing things to start with, and txWS does a good job of adding WebSockets.
- cft 15y agotxWS is the best twisted-based framework for websocket: it does not assume that you want to combine it with a web server, and allows you to wrap your existing protocols into websocket
- DanWaterworth 15y agoIf you're interested in a easy-to-use hosted solution, you could try Pusher ( http://pusher.com http://pusher.com ). It would be the fastest way to get up and running and you wouldn't have to worry about the details. Disclaimer: I work for Pusher.
- ecdavis 15y agoCheck out Pants! http://pantsweb.org/ http://pantsweb.org/
- denik 15y agoWe've just released a bunch of updates for gevent-websocket: https://bitbucket.org/denis/gevent-websocket https://bitbucket.org/denis/gevent-websocket We use it successfully at SiteSupport (http://sitesupport.com http://sitesupport.com)
- aidenn0 15y agoI wrote the websockets implementation for mongrel2, and just as an FYI, it only supports the more recent websockets standard (they made some incompatible changes around draft version 7). The good news is that the only browser that ever had the old version on by default was chrome (firefox and opera defaulted it off for security reasons), so there aren't too many browsers out in the wild using the old version.