Python web开发框架:
Django 、Flask、Tornado、Bottle、Twisted
Tornado: http://www.tornadoweb.org/en/stable/
Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.
Twisted: https://pypi.python.org/pypi/Twisted/ http://twistedmatrix.com/trac/
An asynchronous networking framework written in Python
twisted/tornado 更是一个server,框架部分只是方便使用该server而附带的,不是重点;你可以选择使用tornado server + Django框架, 而对于Bottle框架而言,是允许指定使用哪种server的,支持的server有:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
server_names = { 'cgi': CGIServer, 'flup': FlupFCGIServer, 'wsgiref': WSGIRefServer, 'waitress': WaitressServer, 'cherrypy': CherryPyServer, 'paste': PasteServer, 'fapws3': FapwsServer, 'tornado': TornadoServer, 'gae': AppEngineServer, 'twisted': TwistedServer, 'diesel': DieselServer, 'meinheld': MeinheldServer, 'gunicorn': GunicornServer, 'eventlet': EventletServer, 'gevent': GeventServer, 'geventSocketIO':GeventSocketIOServer, 'rocket': RocketServer, 'bjoern' : BjoernServer, 'auto': AutoServer, } |
Bottle默认使用的server为: 如下:
1 2 3 |
def run(app=None, server='wsgiref', host='127.0.0.1', port=8080, interval=1, reloader=False, quiet=False, plugins=None, debug=None, **kargs): |
所以,有些技术不是同一个层面的,不能相提并论,非此即彼;
Django or Flask:
https://www.zhihu.com/question/33538127
http://bottlepy.org/docs/dev/index.html