简体   繁体   English

相当于龙卷风的阻塞?

[英]A blocking equivalent to Tornado?

I've been working with Tornado and have gotten very used to it's overall style and syntax. 我一直在与Tornado合作,并且已经习惯了它的整体样式和语法。 Currently, I would like to write a website (in Python) that does not require the asynchronous, non-blocking capabilities of Tornado. 目前,我想编写一个网站(使用Python),该网站不需要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. 显然,我可以使用Django或Pylons之类的框架,但是我想知道是否存在特定的Python设置,该设置与Tornado最相似,但是是阻塞而不是非阻塞。

Note: I've been experimenting with Django, but I feel as if it is a bit heavy-weighted for my current needs. 注意:我一直在尝试使用Django,但是我觉得对于我当前的需求来说,它有些沉重。 What I liked about Tornado was its relative simplicity and flexibility while still being capable of scaling nicely should that become a concern. 我喜欢Tornado的原因是它的相对简单性和灵活性,同时仍然能够很好地进行扩展(如果引起关注)。 (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.) (也许我只需要继续使用Django,直到我完全习惯它即可,但这不在这个问题的范围之内。)

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. 另请注意:我并不是在寻求主观意见,而是在寻求基于不同Python框架(我缺乏)的经验,与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看起来是很有前途的,因为它是建立在多个下一代Web框架(包括TurboGears 1,Django和Rails)的经验之上的

Turbo gears 2 涡轮齿轮2

I've also used Tornado and CherryPy web framework looks pretty 'similar' to Tornado: very easy to use, intuitive and very pythonic too. 我还使用了Tornado, CherryPy Web框架看上去与Tornado“非常相似”:非常易于使用,直观且非常Pythonic。 CherryPy is blocking by default (and I think is the only way to use it). CherryPy默认情况下处于阻止状态(我认为这是使用它的唯一方法)。 Hope it helps you. 希望对您有帮助。

Cheers! 干杯!

My favorite "minimal" frameworks are: Flask http://flask.pocoo.org/docs/ and Pyramid http://www.pylonsproject.org/ . 我最喜欢的“最小”框架是:Flask http://flask.pocoo.org/docs/和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. 与龙卷风的最大区别是它们是WSGI(因此被阻止),并且具有许多类似于网站的插件,可满足您部署网站所需的工作。

Flask has lots of examples around and is really easy to start with. Flask周围有很多示例,并且非常容易上手。

wish you fun 希望你开心

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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