How to run the CherryPy web server in the Google App Engine
Asked Answered
D

3

6

The CherryPy web server can supposedly be deployed in the Google App Engine.

Who has done it, and what was the experience like?

What special effort was required (configuration, etc.)?

Would you recommend it to others?

Droopy answered 18/12, 2008 at 21:28 Comment(0)
S
2

The article is a good example but its slightly out of date now as the patch is no longer required, the latest version of Cherrypy should run without it, I've gotten the sample below running in the development environment. I've included cherrypy inside a zip file as the google app engine has a limit of one thousand files per application, it also makes it easier to deploy.

I'm also using the cherrypy dispatch handler to route the request.

 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)

So far I've not come across any particular issues but I have read some people have had issues with sessions.

Stratify answered 11/8, 2009 at 18:48 Comment(0)
D
1

See boodebr.org article (missing, but here on the Wayback machine) It works for me.

If you are looking for an example, look for the condition that accepts ServerMode.GAE in ServerInterface.auto in this example.

Dennisedennison answered 15/8, 2010 at 4:45 Comment(1)
Please check your link - I'm getting a 404.Gynecology
R
0

There is a good article on how to do this over here now here. I haven't actually tried this yet, I stuck with django on App Engine, but it seems to be a solid example.

Ronel answered 7/1, 2009 at 22:42 Comment(1)
Hehe, "stuck w/ Django on App Engine" is an apt description of the current state of affairs.Abohm

© 2022 - 2024 — McMap. All rights reserved.