【发布时间】:2010-09-27 14:51:43
【问题描述】:
CherryPy 网络服务器据说可以部署在 Google App Engine 中。
谁做过,体验如何?
需要什么特别的工作(配置等)?
你会推荐给其他人吗?
【问题讨论】:
标签: google-app-engine cherrypy
CherryPy 网络服务器据说可以部署在 Google App Engine 中。
谁做过,体验如何?
需要什么特别的工作(配置等)?
你会推荐给其他人吗?
【问题讨论】:
标签: google-app-engine cherrypy
article 是一个很好的例子,但它现在作为patch is no longer required 有点过时了,最新版本的 Cherrypy 应该在没有它的情况下运行,我已经在开发环境中运行了下面的示例。 我已将cherrypy 包含在一个zip 文件中,因为谷歌应用引擎每个应用程序限制为一千个文件,这也使其更易于部署。
我还使用cherrypy调度处理程序来路由请求。
import sys
sys.path.insert(0, 'cherrypy.zip')
import cherrypy
import wsgiref.handlers
class Root:
exposed = True
def GET(self):
return "give a basic description of the service"
d = cherrypy.dispatch.MethodDispatcher()
conf = {'/':
{
'request.dispatch': d
}
}
app = cherrypy.tree.mount(Root(), "/",conf)
wsgiref.handlers.CGIHandler().run(app)
到目前为止,我还没有遇到任何特定问题,但我读到有些人在会话方面遇到问题。
【讨论】:
参见 boodebr.org 文章(缺失,但 here on the Wayback machine)它对我有用。
如果您正在寻找示例,请在 this example 的 ServerInterface.auto 中寻找接受 ServerMode.GAE 的条件。
【讨论】: