开发者

How do I get the Application ID at runtime

开发者 https://www.devze.com 2023-02-21 19:59 出处:网络
I need the Application ID to construct the correct <applicationid>.appspotmail.com address, and I\'m having a hard time f开发者_如何学编程inding out how to retrieve it at runtime.The recommended

I need the Application ID to construct the correct <applicationid>.appspotmail.com address, and I'm having a hard time f开发者_如何学编程inding out how to retrieve it at runtime.


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


You can get it using:

os.environ['APPLICATION_ID']
0

精彩评论

暂无评论...
验证码 换一张
取 消