Python code can access environment variables using the os.environ dictionary:
import os
for name in os.environ.keys():
v = os.environ[name]
APPLICATION_ID: The ID of the currently running application.
CURRENT_VERSION_ID: The major and minor version of the currently running application, as "X.Y". The major version number ("X") is specified in the app's app.yaml file. The minor version number ("Y") is set automatically when each version of the app is uploaded to App Engine. On the development web server, the minor version is always "1".
AUTH_DOMAIN: The domain used for authenticating users with the Users API. Apps hosted on appspot.com have an AUTH_DOMAIN of gmail.com, and accept any Google account. Apps hosted on a custom domain using Google Apps have an AUTH_DOMAIN equal to the custom domain.
SERVER_SOFTWARE: In the development web server, this value is "Development/X.Y" where "X.Y" is the version of the runtime.
Additional environment variables are set according to the CGI standard. For more information on these variables, see the CGI standard.





