google-drive-api - 构建 Drive v2 API 时,Google API 客户端非常慢

标签 google-drive-api

驱动API服务的构建需要很长的时间(10+秒)。我尝试腌制服务并重新加载它,但没有任何乐趣。有人知道如何让这个东西本地缓存吗?

debug("Building Google Drive service")
from apiclient.discovery import build
self._service = build('drive', 'v2', http = http)

debug("Initialisation complete")

最佳答案

您可以在 http 级别打开缓存:

http = httplib2.Http(cache=".cache")

请参阅:https://developers.google.com/appengine/articles/efficient_use_of_discovery_based_apis

关于google-drive-api - 构建 Drive v2 API 时,Google API 客户端非常慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16746545/

相关文章:

python - Google OAuth2 - 如何更改 expires_in 或 token_expiry 值?

google-apps-script - 如何解析存储在我的谷歌驱动器中但作为 html 类型突出的 XML 文件?

build - Gradle 全局构建目录

python - 如何在 Google Colab 中处理来自 Google Drive 的视频

google-drive-api - 谷歌文档 API v3 : Updating a document removes it from shared folder

java - 无法使用java代码从谷歌驱动器下载谷歌表格

java - 如何使用 Drive SDK 列出域中的所有 Google 文档?

google-drive-api - 为什么此示例 AppScript 返回错误 : "Access Denied: DriveApp?"

google-apps-script - 使用 Google Advanced Drive 服务在带有 Apps Script 的文件夹中创建新文件

windows-8 - 使用 Google Drive API javascript 上传或更新文件时标题为 'Untitled'?