News for hackers. Stuff that matters.
Re:Why so many Python web frameworks? by espeed on Sunday February 12, 2012 @06:31PM (#3583421)
Building a non-WSGI Python framework would be useful because WSGI does not support websockets (http://librelist.com/browser//flask/2011/12/30/websockets/#b...).

A ZeroMQ-based framework might be interesting -- Brubeck (http://brubeck.io/) is an example of this.

Nginx (https://github.com/FRiCKLE/ngx_zeromq) is starting to get support for ZeroMQ, and Mongrel2 (http://mongrel2.org/) was designed around it.

Re:Why so many Python web frameworks? by jemeshsu on Sunday February 12, 2012 @10:56PM (#3584146)
Python's greenlet libraries such as Gevent & eventlet makes websocket type of applications possible. It is not difficult to add in websocket support into WSGI frameworks such as Pyramid/Flask. One example http://blog.abourget.net/2011/3/17/new-and-hot-part-4-pyrami.... You can have both WSGI and websocket in the same stack.
Re:Why so many Python web frameworks? by espeed on Sunday February 12, 2012 @11:12PM (#3584186)
You can, but monkey patching is not always ideal (https://www.google.com/search?q=gevent+monkey+patch+issues).
Re:Why so many Python web frameworks? by jemeshsu on Monday February 13, 2012 @01:29AM (#3584490)
Support for websocket is not yet fully baked into Mongrel2. The handshake etc needs to be done on the handler side. So gevent solution is a better bet at the moment. The alternative is to have a separate Tornado/Node.js to handle websocket alongside Django/Pyramid app. Mongrel2 does look promising, although it seems zedshaw is pretty resource tide at the moment.
Re:Why so many Python web frameworks? by irahul on Monday February 13, 2012 @01:34AM (#3584500)
Don't run on your whole app on gevent, but only the part which needs streaming/long poll. By decreasing the surface area, you can pin point the bugs arising due to monkey patching.
Re:Why so many Python web frameworks? by ak217 on Sunday February 12, 2012 @07:36PM (#3583617)
I'm really interested in this for building simple API endpoints. I tried a bunch of WSGI servers and lightweight frameworks to serve stuff on them, but realized that there is no way to support chunked request content encoding with WSGI (the WSGI spec is not compatible with it, so WSGI can't support HTTP/1.1). Hopefully Brubeck is good, please let us know if there's anything else worth checking out!
Re:Why so many Python web frameworks? by warp on Sunday February 12, 2012 @09:05PM (#3583865)
That doesn't sound correct. Both PEP 333 and 3333 specifically mention that the server may use chunked encoding.
Re:Why so many Python web frameworks? by ak217 on Sunday February 12, 2012 @09:24PM (#3583907)
OK, I should have made this more clear, and I'll edit the original. WSGI is not compatible with chunked encoded POST request bodies.
Re:Why so many Python web frameworks? by anthonyb on Sunday February 12, 2012 @08:14PM (#3583722)