Groups
Groups
Sign in
Groups
Groups
Google App Engine
Conversations
Labels
About
Send feedback
Help
Python 3: how to determine the current app's project id?
463 views
Skip to first unread message
Ryan B
unread,
Nov 6, 2019, 10:11:14 AM
11/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
Hi all! In the Python 2 runtime, I can use the
app_identity API
to determine the current app's project id (ie application id) with
app_identity.get_application_id()
. Anyone know how to do this in the Python 3 runtime?
https://cloud.google.com/appengine/docs/standard/python3/python-differences#app_engine_apis
doesn't mention the app_identity API, and
https://cloud.google.com/appengine/docs/standard/python3/python-differences#modules
doesn't mention project id.
Thanks in advance!
Ryan B
unread,
Nov 6, 2019, 5:10:24 PM
11/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
ah, found it. looks like it's
GAE_APPLICATION
:
https://cloud.google.com/appengine/docs/standard/python3/runtime#environment_variables
might be worth adding to the
differences page
!
Elliott (Cloud Platform Support)
unread,
Nov 6, 2019, 6:17:25 PM
11/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
Hello Ryan,
I've sent your feedback on the differences page.
Jason Collins
unread,
Nov 6, 2019, 8:24:01 PM
11/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
Ryan, in runtime:python37 there is also a metadata server like the GCE metadata server. Unfortunately, you'll have to find the docs for that over in the Java8 docs...
https://cloud.google.com/appengine/docs/standard/java/accessing-instance-metadata
Reply all
Reply to author
Forward
0 new messages