def get_project_id():
"""Gets the project ID for the current App Engine application.
Returns:
str: The project ID
Raises:
EnvironmentError: If the App Engine APIs are unavailable.
"""
# pylint: disable=missing-raises-doc
# Pylint rightfully thinks EnvironmentError is OSError, but doesn't
# realize it's a valid alias.
if app_identity is None:
raise EnvironmentError(
'The App Engine APIs are not available.')
return app_identity.get_application_id()
app_engine.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录