Google App Engine

804 views
Skip to first unread message

Tommi

unread,
Apr 8, 2008, 1:28:12 AM4/8/08
to web.py
http://appengine.google.com/

Looks nifty. The released SDK also includes a mini web app framework
(called `webapp`) that is somewhat similar to web.py -- has e.g. get/
post handlers, although for the most part things are more directed
towards Google's own infrastructure.

One can host web.py apps there, also.

Aaron Swartz

unread,
Apr 8, 2008, 1:33:20 AM4/8/08
to we...@googlegroups.com
I just got back from the introduction at Google HQ. I'm working on
getting a web.py app up now.

BjornT

unread,
Apr 8, 2008, 1:44:47 AM4/8/08
to web.py
Man I wish I had known about this, I would have been there at Google.
I should pay more attention to my baypiggies mailing list.

Aaron Swartz

unread,
Apr 8, 2008, 1:55:25 AM4/8/08
to we...@googlegroups.com
OK, my first web.py app is up at:

http://webpy.appspot.com/

Click for the source code. (It's 0.3, but I expect 0.2 would work fine
the same way.)

Doesn't seem to be any trouble using web.py at all.

Curt Micol

unread,
Apr 8, 2008, 7:39:43 AM4/8/08
to we...@googlegroups.com

I have to say, I am pretty impressed with what I've read so far. Now
I have to wait for an invite.

Thanks,
--
# Curt Micol

bubblboy

unread,
Apr 8, 2008, 8:25:42 AM4/8/08
to we...@googlegroups.com

narf; LIMIT 10 for the last 5 notes?

but looks nice :) very simple. I like ^^

rkm...@gmail.com

unread,
Apr 8, 2008, 8:40:02 AM4/8/08
to we...@googlegroups.com
On Mon, Apr 7, 2008 at 10:55 PM, Aaron Swartz <m...@aaronsw.com> wrote:
> OK, my first web.py app is up at:
> http://webpy.appspot.com/
really cool!!


> Click for the source code. (It's 0.3, but I expect 0.2 would work fine
> the same way.)

how do you start /configure this app with web.py? is a config file needed ?

rkm...@gmail.com

unread,
Apr 8, 2008, 8:51:32 AM4/8/08
to we...@googlegroups.com
OK, I got it configured with app.yaml file

application: helloworld
version: 1
runtime: python
api_version: 1

handlers:
- url: /.*
script: code.py


but when i try to run it says app has no cgirun attribute.. i am using
latest web.py dev 0.3 version. how to fix this?

Traceback (most recent call last):
File "/tmp/google_appengine/google/appengine/tools/dev_appserver.py",
line 2245, in _HandleRequest
base_env_dict=env_dict)
File "/tmp/google_appengine/google/appengine/tools/dev_appserver.py",
line 334, in Dispatch
base_env_dict=base_env_dict)
File "/tmp/google_appengine/google/appengine/tools/dev_appserver.py",
line 1743, in Dispatch
self._module_dict)
File "/tmp/google_appengine/google/appengine/tools/dev_appserver.py",
line 1654, in ExecuteCGI
reset_modules = exec_script(handler_path, cgi_path, hook)
File "/tmp/google_appengine/google/appengine/tools/dev_appserver.py",
line 1555, in ExecuteOrImportScript
exec module_code in script_module.__dict__
File "/tmp/google_appengine/test/code.py", line 37, in <module>
main = app.cgirun()
AttributeError: application instance has no attribute 'cgirun'

Aaron Swartz

unread,
Apr 8, 2008, 11:47:20 AM4/8/08
to we...@googlegroups.com
Oops, I forgot to check in cgirun. Should be fixed now. Sorry.

rkm...@gmail.com

unread,
Apr 8, 2008, 12:23:32 PM4/8/08
to we...@googlegroups.com
On Tue, Apr 8, 2008 at 8:47 AM, Aaron Swartz <m...@aaronsw.com> wrote:
> Oops, I forgot to check in cgirun. Should be fixed now. Sorry.
can you make a release for web.py .23 also?
thanks

Aaron Swartz

unread,
Apr 8, 2008, 12:34:19 PM4/8/08
to we...@googlegroups.com
For 0.23, just do:

import google.appengine.ext.utils
main = google.appengine.ext.utils.run_wsgi_app(web.wsgifunc(web.webpyfunc(urls,
globals()))

rkm...@gmail.com

unread,
Apr 8, 2008, 2:44:14 PM4/8/08
to we...@googlegroups.com
Can you also make available templates/index.html for completeness?
thanks

On Tue, Apr 8, 2008 at 8:47 AM, Aaron Swartz <m...@aaronsw.com> wrote:
>

lui...@gmail.com

unread,
Apr 8, 2008, 2:46:04 PM4/8/08
to web.py
I am so excited!!
This is something BIG for python developers. Free google accounts for
python development. Am I dreaming??

By the way, "webapp" looks surprisingly similar to webpy.
I can't wait to get some spare time to get my hands on this...

Aaron Swartz

unread,
Apr 8, 2008, 3:01:47 PM4/8/08
to we...@googlegroups.com
> By the way, "webapp" looks surprisingly similar to webpy.

Yeah, I noticed the same thing.

I added the template to the source code for those who are curious:

http://webpy.appspot.com/source

Cameron Watters

unread,
Apr 8, 2008, 6:10:17 PM4/8/08
to web.py
>     import google.appengine.ext.utils
>     main = google.appengine.ext.utils.run_wsgi_app(web.wsgifunc(web.webpyfunc(urls,
> globals()))

The above didn't work for me, but this did:

import google.appengine.ext.webapp.util
main =
google.appengine.ext.webapp.util.run_wsgi_app(web.wsgifunc(web.webpyfunc(urls,globals())))
Message has been deleted

Aaron Swartz

unread,
Apr 8, 2008, 6:20:32 PM4/8/08
to we...@googlegroups.com
> can some one share the source code for running google app engine from
> cheetah

Dude, I'm this close to banning the next person who asks about Cheetah
on this list. This is not the Cheetah users support group.

lui...@gmail.com

unread,
Apr 8, 2008, 6:22:14 PM4/8/08
to web.py
I'm getting an error when trying to start the server:

C:\Archivos de programa\Google\google_appengine
\webpyapp>dev_appserver.py webpya
pp
Traceback (most recent call last):
File "C:\Archivos de programa\Google\google_appengine
\dev_appserver.py", line
50, in <module>
execfile(script_path, globals())
File "C:\Archivos de programa\Google\google_appengine\google/
appengine/tools/d
ev_appserver_main.py", line 338, in <module>
sys.exit(main(sys.argv))
File "C:\Archivos de programa\Google\google_appengine\google/
appengine/tools/d
ev_appserver_main.py", line 287, in main
config, matcher = dev_appserver.LoadAppConfig(root_path, {})
File "C:\Archivos de programa\Google\google_appengine\google
\appengine\tools\d
ev_appserver.py", line 2415, in LoadAppConfig
raise AppConfigNotFoundError
google.appengine.tools.dev_appserver.AppConfigNotFoundError

The app.yaml file is as follows:

application: webpyapp
version: 1
runtime: python
api_version: 1

handlers:
- url: /.*
script: code.py

Any hint?

Luis

Aaron Swartz

unread,
Apr 8, 2008, 6:24:03 PM4/8/08
to we...@googlegroups.com
You're already in the webpyapp directory; you either need to "cd .."
first or do:

dev_appserver.py .

Message has been deleted
Message has been deleted

Bjorn Tipling

unread,
Apr 8, 2008, 7:35:33 PM4/8/08
to web.py
Would be nice to integrate the datastore with db.py:
http://code.google.com/appengine/docs/datastore/creatinggettinganddeletingdata.html

Has an interesting SQL + put/get syntax.

On Apr 8, 4:22 pm, "luis...@gmail.com" <luis...@gmail.com> wrote:
> You are right! What a fool...
>
> Now the server starts, but I get this output:
>
> > <string>(1)<module>()
>
> (Pdb)
>
> I made sure all the code was right and the template is in the
> "templates" directory.
> What could possibly go wrong?
>
> Luis

Aaron Swartz

unread,
Apr 8, 2008, 10:15:39 PM4/8/08
to we...@googlegroups.com
I'm not sure it needs to be integrated; as my example app shows it
works just fine with web.py out of the box. What could we add?

paul jobs

unread,
Apr 10, 2008, 5:38:30 PM4/10/08
to we...@googlegroups.com

import os, sys
sys.stderr.write(db.__file__ + '\n')

What is the use of these lines at the end of the code.py source you have share aaron

On Mon, Apr 7, 2008 at 10:55 PM, Aaron Swartz <m...@aaronsw.com> wrote:

Aaron Swartz

unread,
Apr 10, 2008, 5:46:16 PM4/10/08
to we...@googlegroups.com
That was just debug code; I took it out a while ago.

rkm...@gmail.com

unread,
Apr 11, 2008, 3:33:35 PM4/11/08
to we...@googlegroups.com
I am having trouble adding session middleware for google app-engine..
does anyone have examples for doing this for 0.23 or 0.3??

this doesnt work for .23
def session_mw(app):
return FacebookWSGIMiddleware(app, config_fb,
facebook_class=facebookstuff.Facebook)

import google.appengine.ext.webapp.util
main = google.appengine.ext.webapp.util.run_wsgi_app(web.wsgifunc(web.webpyfunc(urls,
globals
(), session_mw)))


and how do i do it for 0.3?
thanks

krishna2

unread,
Apr 11, 2008, 3:58:26 PM4/11/08
to web.py

I guess, something like this ?

from Cheetah.Template import Template
print Template(file="templates/file.tmpl", searchList=[locals()])

-k

peter

unread,
Apr 18, 2008, 7:58:01 AM4/18/08
to web.py
> how do you start /configure this app with web.py? is a config file needed ?

a) installed webpy 0.3 on my system (python setup.py install)
- I added the 0.3 source because the sample Aaron supplied works
without changes

b) To allow remote development add webpy.web (web/) to your source
directory
for uploading.

c) To allow local development you have to let the google code see
webpy.web
so create a symbolic link from your webpy install to a web directory
up from
your source code in the root dir of your google appengine install

ln -s /usr/lib/python2.5/site-packages/web web

This is mentioned in the docs ~
http://code.google.com/appengine/docs/python/purepython.html

d) I've found problems with Cheetah. I had it installed and received
errors
because it calls strop. So I removed my local copy and the error
stopped.

e) You should be able to work locally & remotely using webpy.

You can see a screencap of a demo http://flickr.com/photos/bootload/2421595533/
where I tried:

- import web
- dir(web)

Nothing special, but proved to me webpy installs well. The source app
Aaron supplied ~ http://webpy.appspot.com/ also works out of the box.

As a side note one of the original developers Bret Taylor based app-
engine
and Friendfeed http://bret.appspot.com/entry/experimenting-google-app-engine
on webpy. A good reason to work with webpy.

davidp

unread,
Apr 24, 2008, 5:21:50 PM4/24/08
to web.py
I'm having the same problem but still didn't got it working... btw,
when installing the Google App Engine SDK it didn't
updated the PATH variable... could you tell me what you've got in it?

One weird thing about the error is that it's not even looking for the
app.yalm file in the right directory, check this out:

mac:googleapps diecinueve$ dev_appserver.py /Users/diecinueve/Sites/
googleapps/helloworld/
Traceback (most recent call last):
File "/usr/local/google_appengine/dev_appserver.py", line 50, in
<module>
execfile(script_path, globals())
File "/usr/local/google_appengine/google/appengine/tools/
dev_appserver_main.py", line 338, in <module>
sys.exit(main(sys.argv))
File "/usr/local/google_appengine/google/appengine/tools/
dev_appserver_main.py", line 287, in main
config, matcher = dev_appserver.LoadAppConfig(root_path, {})
File "/usr/local/google_appengine/google/appengine/tools/
dev_appserver.py", line 2425, in LoadAppConfig
raise AppConfigNotFoundError
google.appengine.tools.dev_appserver.AppConfigNotFoundError

any ideas on what to do?

thanks,
david.


On Apr 18, 4:58 am, peter <goonm...@netspace.net.au> wrote:
> > how do you start /configure this app with web.py? is a config file needed ?
>
> a) installed webpy 0.3 on my system (python setup.py install)
> - I added the 0.3 source because the sample Aaron supplied works
> without changes
>
> b) To allow remote development add webpy.web (web/) to your source
> directory
> for uploading.
>
> c) To allow local development you have to let the google code see
> webpy.web
> so create a symbolic link from your  webpy install to a web directory
> up from
> your source code in the root dir of your google appengine install
>
>    ln -s /usr/lib/python2.5/site-packages/web web
>
> This is mentioned in the docs ~
>  http://code.google.com/appengine/docs/python/purepython.html
>
> d) I've found problems with Cheetah. I had it installed and received
> errors
> because it calls strop. So I removed my local copy and the error
> stopped.
>
> e) You should be able to work locally & remotely using webpy.
>
> You can see a screencap of a demohttp://flickr.com/photos/bootload/2421595533/
> where I tried:
>
> - import web
> - dir(web)
>
> Nothing special, but proved to me webpy installs well. The source app
> Aaron supplied ~http://webpy.appspot.com/also works out of the box.
>
> As a side note one of the original developers Bret Taylor based app-
> engine
> and Friendfeedhttp://bret.appspot.com/entry/experimenting-google-app-engine

Yoan Blanc

unread,
Apr 25, 2008, 2:21:59 AM4/25/08
to we...@googlegroups.com
http://groups.google.com/group/google-appengine sounds to be a good start.

-- Yoan

manatlan

unread,
May 29, 2008, 4:31:00 PM5/29/08
to web.py
> I just got back from the introduction at Google HQ. I'm working on
> getting a web.pyappup now.

Seems since rev 232 of webpy 0.3 : it doesn't work anymore ...
only "page not found"

manatlan

unread,
May 30, 2008, 11:56:07 AM5/30/08
to web.py
in fact, it seems it's a "web.subdomain_application" problem ...
domain mapping seems to do nothing

manatlan

unread,
May 30, 2008, 12:00:08 PM5/30/08
to web.py
> in fact, it seems it's a "web.subdomain_application" problem ...
> domain mapping seems to do nothing

it's clearly that !
doctests of application.py don't pass !

see here :
File "application.py", line 428, in __main__.subdomain_application
Failed example:
app2.request("/hello", host="hello.example.com").data
Expected:
'hello'
Got:
'not found'
**********************************************************************
1 items had failures:
1 of 9 in __main__.subdomain_application
***Test Failed*** 1 failures.

manatlan

unread,
May 30, 2008, 12:22:02 PM5/30/08
to web.py
i 'd reported the bug in launchpad here :
https://bugs.launchpad.net/webpy/+bug/236127
Reply all
Reply to author
Forward
0 new messages