且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Python 中使用服务帐户对 Google Cloud 进行身份验证?

更新时间:2023-12-03 09:37:58

我通常在 python 脚本中设置这个变量,比如:

I usually set this variable in the python script itself, something like:

import os
from google.cloud.bigquery.client import Client

os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'path_to_json_file'
bq_client = Client()