boodebr sandbox App Engine samples and tutorials from boodebr.org


Recently Edited
InfoDump edit
frank, 06 July 2008 (created 20 April 2008)
When working in a new web environment, I like to explore the environment a little to discover any limitations that I may not have expected. For example, in certain environments you may discover some headers are missing, or there are extra environment variables that are useful to have.

To create this example, I made a new subfolder infodump/ containing a single file info.py (source code). To hook it into the site, I added the following to app.yaml:
- url: /infodump.*
  script: infodump/info.py
Make sure to add this handler before the default handler at the bottom of the file.
info.py defines two primary methods:
index()
This method handles requests for /infodump
default()
This handles all other requests.

Here are two examples. The only difference between them is that in the second example the extra path and query will be shown as args and kwargs in the request table.

Request for "/info" will be handled by index()
http://boodebr.appspot.com/infodump

This request will be handled by default(). Notice that the args and kwargs will now be filled in the table
http://boodebr.appspot.com/infodump/a/b/c?qA=AAA&qB=BBB