Take the 2-minute tour ×

does someone have an idea how to get the environment variables on Google-AppEngine ?

I'm trying to write a simple Script that shall use the Client-IP (for Authentication) and a parameter (geturl or so) from the URL (for e.g. http://thingy.appspot.dom/index?geturl=www.google.at)

I red that i should be able to get the Client-IP via "request.remote_addr" but i seem to lack 'request' even tho i imported webapp from google.appengine.ext

Many thanks in advance, Birt

share|improve this question
Can you post some of the code you have in main.py (assuming that is where you try to get the request parameters)? –  Tom van Enckevort Nov 9 '09 at 11:31
add comment

3 Answers

up vote 2 down vote accepted

In short, assuming you're using webapp: you can get the client ip address via self.request.remote_addr and the parameter with self.request.get("geturl")

See the Handling Forms with webapp section of the tutorial.

share|improve this answer
add comment

To answer the actual question from the title of your post, assuming you're still wondering: to get environment variables, simple import os and the environment is available in os.environ.

share|improve this answer
add comment

Are you using webapp or doing CGI-style? The webapp request class is documented at the appengine docs.

share|improve this answer
add comment

Your Answer


