python - 如何在 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
或某些第 3 方。
对于其他人,您使用标准 Python 库,例如:google.auth
=> rauth
、google.appengine.api.memcache
=>python-memcached
在此处阅读更多信息:https ://cloud.google.com/appengine/docs/standard/python3/python-differences
该页面建议使用 Google Identity Platform 或 Firebase 身份验证进行授权。
推荐阅读
- c++ - '{' token 之前不允许函数定义"
- mysql - 将 COUNT 与 HAVING 一起使用但行实际存在时为 0 个结果 - MySQL
- php - PHP中的Curl Post Response未显示完整的html
- android - RecyclerView 上的 Android EditText 搜索问题
- azure-keyvault - KeyVault 架构 - 只有用户可以访问自己的数据
- python - 如何删除熊猫数据框中的某些行值(不为空)
- parsing - 理解 Text.ParserCombinators.ReadP.sepBy1
- linux - 在这个 unix 命令中需要帮助
- javascript - 滚动到锚点位置,同时考虑到固定标题,当新导航到带有哈希的 url 时
- python - 无法导入声音文件python