gpt4 book ai didi

python - Python 代码是否总是需要一个服务帐户来生成用于在谷歌云上上传的签名 url?

转载 作者:行者123 更新时间:2023-12-01 23:05:41 24 4
gpt4 key购买 nike

<分区>

有没有一种方法可以通过在 python 中使用应用程序默认凭据来生成签名的 url?我在使用 storage 对象的 java 中看到了对它的支持。

在网上提供的 python 代码上说:

def generate_upload_signed_url_v4(bucket_name, blob_name):
"""Generates a v4 signed URL for uploading a blob using HTTP PUT.

Note that this method requires a service account key file. You can not use
this if you are using Application Default Credentials from Google Compute
Engine or from the Google Cloud SDK.
"""

我想知道是否有像 Java 中那样使用应用程序默认凭据而不是服务帐户凭据的方法

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com