Content-Length: 263901 | pFad | https://github.com/googleapis/python-bigquery/commit/60fbf287b0d34d5db2e61cce7a5b42735ed43d0e

D1 docs(bigquery): Add alternative approach to setting credentials (#517) · googleapis/python-bigquery@60fbf28 · GitHub
Skip to content

Commit 60fbf28

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 credentials Correction: json object rather than string * Remove trailing space Co-authored-by: Peter Lamut <plamut@users.noreply.github.com>
1 parent 1862de7 commit 60fbf28

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
return client

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/python-bigquery/commit/60fbf287b0d34d5db2e61cce7a5b42735ed43d0e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy