简体   繁体   中英

A blocking equivalent to Tornado?

I've been working with Tornado and have gotten very used to it's overall style and syntax. Currently, I would like to write a website (in Python) that does not require the asynchronous, non-blocking capabilities of Tornado. Obviously, I can use frameworks like Django or Pylons, but I was wondering if there was a particular Python setup that would most closely resemble Tornado but be blocking, rather than non-blocking.

Note: I've been experimenting with Django, but I feel as if it is a bit heavy-weighted for my current needs. What I liked about Tornado was its relative simplicity and flexibility while still being capable of scaling nicely should that become a concern. (Maybe I just need to keep plugging away with Django until I've become totally accustomed to it, but that's outside the realm of this question.)

Also note: I am not looking for a subjective opinion, rather, I am looking for someone to suggest, based on experience with the different Python frameworks (which I am lacking), similar design setups to Tornado.

Thanks.

Turbo gears 2 looks promising as it has been built on top of the experience of several next generation web frameworks including TurboGears 1, Django, and Rails

Turbo gears 2

I've also used Tornado and CherryPy web framework looks pretty 'similar' to Tornado: very easy to use, intuitive and very pythonic too. CherryPy is blocking by default (and I think is the only way to use it). Hope it helps you.

Cheers!

My favorite "minimal" frameworks are: Flask http://flask.pocoo.org/docs/ and Pyramid http://www.pylonsproject.org/ .

Big difference to tornado is that they are WSGI (hence blocking) and have lots of web-site-like plugins for the things you need to do deploying web-sites.

Flask has lots of examples around and is really easy to start with.

wish you fun

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM