在龙卷风下运行金字塔WSGI应用程序

sti*_*tic 2 python wsgi tornado pyramid waitress

Pyramid使用它自己的Waitress Web服务器进行开发,但我想在Tornado下提供我的WSGI应用程序.我想我应该使用pserve .ini文件来配置它,但我无法让它工作

Mic*_*kel 6

可以轻松地从INI文件加载Pyramid应用程序.从那里你只需将wsgi应用程序传递给Tornado的WSGIContainer.

from pyramid.paster import get_app

app = get_app('development.ini')
container = tornado.wsgi.WSGIContainer(app)
Run Code Online (Sandbox Code Playgroud)