Sverre Rabbelier
Sverre Rabbelier

Reputation: 1506

How do I get the Application ID at runtime

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.

Upvotes: 7

Views: 5605

Answers (2)

Saxon Druce
Saxon Druce

Reputation: 17624

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

Upvotes: 13

systempuntoout
systempuntoout

Reputation: 74134

You can get it using:

os.environ['APPLICATION_ID']

Upvotes: 0

Related Questions