Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit60fbf28

Browse files
alanyeeplamut
andauthored
docs(bigquery): Add alternative approach to setting credentials (#517)
* docs(bigquery): Add alternative approach to setting credentials* docs(bigquery): Add alternative approach to setting credentialsCorrection: json object rather than string* Remove trailing spaceCo-authored-by: Peter Lamut <plamut@users.noreply.github.com>
1 parent1862de7 commit60fbf28

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎samples/snippets/authenticate_service_account.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ def main():
3030
key_path,scopes=["https://www.googleapis.com/auth/cloud-platform"],
3131
)
3232

33+
# Alternatively, use service_account.Credentials.from_service_account_info()
34+
# to set credentials directly via a json object rather than set a filepath
35+
# TODO(developer): Set key_json to the content of the service account key file.
36+
# credentials = service_account.Credentials.from_service_account_info(key_json)
37+
3338
client=bigquery.Client(credentials=credentials,project=credentials.project_id,)
3439
# [END bigquery_client_json_credentials]
3540
returnclient

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp