def __init__(self, scopes=None, service_account_id=None):
"""
Args:
scopes (Sequence[str]): Scopes to request from the App Identity
API.
service_account_id (str): The service account ID passed into
:func:`google.appengine.api.app_identity.get_access_token`.
If not specified, the default application service account
ID will be used.
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.')
super(Credentials, self).__init__()
self._scopes = scopes
self._service_account_id = service_account_id
self._signer = Signer()
app_engine.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录