I need the Application ID to construct the correct <applicationid>.appspotmail.com
address, and I'm having a hard time finding out how to retrieve it at runtime.
7
13
The recommended approach now is to use app_identity.get_application_id()
:
http://code.google.com/appengine/docs/python/appidentity/functions.html#get_application_id
See the warning box here for details:
http://code.google.com/appengine/docs/python/runtime.html#Requests_and_Domains
-
-
1
-
The warning box seems to be long gone, but I found this in the release notes from July 2011: "The SDK application environment variable will now be prefixed with dev~. The new preferred way of retrieving your app id is to use appidentity.get_application_id(). The --default_partition flag can be used for applications whose code relied on a specific environment variable." – Pat Nov 6 '14 at 19:12
-
-
0
You can get it using:
os.environ['APPLICATION_ID']
-
This is now considered harmful, see warning box on code.google.com/appengine/docs/python/… – Sverre Rabbelier Aug 21 '11 at 4:04