如何在Google AppEngine Python37中获取凭据
我在AppEngine Python3.7标准版中启动了新应用。
我正在尝试使用以下代码段获取凭据,但失败了。
任何人都可以使用credentials
GAE标准Python37吗?
输入:
from google.auth import app_engine
credentials = app_engine.Credentials()
输出:
The App Engine APIs are not available
-
将App Engine Standard与python
3.7结合使用时,没有google.xxx库可用。您必须构建自己的数据库或使用标准的Python库。这同样适用于:auth
,users
,images
,search
,mail
,taskqueue
,memcache
,urlfetch
,deferred
,等等,甚至在ndb
数据存储接口。对于数据存储,您使用
google-cloud-datastore
或第三方。对于其他人,则使用标准的Python库,例如:
google.auth
=>rauth
,google.appengine.api.memcache
=>python-memcached
在此处了解更多信息:https : //cloud.google.com/appengine/docs/standard/python3/python-
differences该页面建议使用Google Identity Platform或Firebase身份验证进行授权。