Pyramid 1.3 + GAE + Python 2.7 + threadsafe

60 views
Skip to first unread message

Constantine Vasil

unread,
Mar 23, 2012, 12:55:44 PM3/23/12
to pylons-...@googlegroups.com
I was able to successfully run a "Hello World" Pyramid app 
using Python 2.5.

I need to run Python 2.7 now. 

Here is what is needed:
 
app.yaml 
========================= 
application: myapp
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /.*
  script: myapp.app
=========================

I need to move my WSGI application object to the global scope:
=========================
import webapp2

class MainPage(webapp2.​RequestHandler):
    def get(self):
        self.response.headers['​Content-Type'] = 'text/plain'
        self.response.out.write('​Hello, WebApp World!')

app = webapp2.WSGIApplication([('/', MainPage)])
=========================

This example is using webapp2. Do I need to use webapp2,
if so how to use Pyramid too?

Any help would be much appreciated,

Thank you in advance,

Jim Washington

unread,
Mar 23, 2012, 4:43:48 PM3/23/12
to pylons-...@googlegroups.com
On Fri, 2012-03-23 at 09:55 -0700, Constantine Vasil wrote:
> I was able to successfully run a "Hello World" Pyramid app
> using Python 2.5.
>
>
> I need to run Python 2.7 now.
>
>
> Here is what is needed:
> http://code.google.com/​appengine/docs/python/​python27/using27.html

Hi, Constantine

Short answer: It can work. Probably.

Long answer:

One way to do it is to start with a pyramid scaffold newly built just
for this purpose.

http://pypi.python.org/pypi/pyramid_appengine/0.5.2dev

Note the "dev". Help development of this scaffold by submitting issues
to https://github.com/twillis/pyramid_appengine .

BTW, An initial proof of concept of the setup you mention (and using the
scaffold I mention) is at http://test-app-509.appspot.com/ .

- Jim Washington


Reply all
Reply to author
Forward
Message has been deleted
0 new messages