As of September 2021 the Vision API Alpha endpoint is shut down. For information on the Generally Available version of this product and its features, see the
Vision API documentation .
发送反馈
Alpha 版客户端库
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
安装 Python 客户端库
注意 :客户端库已更新,反映了 Vision Alpha 版的最新更改。这些更改不向后兼容 0.30.1 之前的客户端库版本。请参阅本主题中的最新代码示例,以查看有关如何使用新的客户端库调用 Vision Alpha 版的示例。
Python
pip install https://storage.googleapis.com/api-client-staging/vision-python-q1alpha-mar2019.tar.gz
Authentication
如需使用 Alpha 版客户端库,您必须创建并激活服务账号。
安装 Google Cloud CLI 。
创建服务账号 。
创建服务账号密钥 并下载 JSON 密钥文件。
将 GOOGLE_APPLICATION_CREDENTIALS
环境变量设置为指向您的服务账号密钥文件。这样一来,您的客户端库就能够使用应用默认凭据 (ADC)。
export GOOGLE_APPLICATION_CREDENTIALS=path-to-key-file
运行以下命令 来进行身份验证:
gcloud auth login
发送反馈
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可 获得了许可,并且代码示例已根据 Apache 2.0 许可 获得了许可。有关详情,请参阅 Google 开发者网站政策 。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-07。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
需要向我们提供更多信息?