Skip to content

Commit

Permalink
Make TODO clearer what action to take. [(#1963)](GoogleCloudPlatform/…
Browse files Browse the repository at this point in the history
…python-docs-samples#1963)

* Make TODO clearer what action to take.

Describe the variables to set explicitly (rather than "this"), as
suggested in internal CL 227863277.

* Use standard 'uncomment the variable below' for TODO

* Move variable below TODO.
  • Loading branch information
tswast authored and shollyman committed Jul 22, 2020
1 parent 8fdf65d commit 906f682
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions samples/snippets/user_credentials.py
Expand Up @@ -27,10 +27,13 @@ def main(project, launch_browser=True):
# [START bigquery_auth_user_flow]
from google_auth_oauthlib import flow

# TODO: Use a local server in the auth flow? This is recommended but does
# not work if accessing the application remotely, such as over SSH or
# from a remote Jupyter notebook.
# TODO: Uncomment the line below to set the `launch_browser` variable.
# launch_browser = True
#
# The `launch_browser` boolean variable indicates if a local server in the
# auth flow. A value of `True` is recommended, but a local server does not
# work if accessing the application remotely, such as over SSH or from a
# remote Jupyter notebook.

appflow = flow.InstalledAppFlow.from_client_secrets_file(
'client_secrets.json',
Expand All @@ -47,11 +50,13 @@ def main(project, launch_browser=True):
# [START bigquery_auth_user_query]
from google.cloud import bigquery

# TODO: This project will be billed for the query processing. The user must
# have the bigquery.jobs.create permission on this project to run a
# query. See:
# https://cloud.google.com/bigquery/docs/access-control#permissions
# TODO: Uncomment the line below to set the `project` variable.
# project = 'user-project-id'
#
# The `project` variable defines the project to be billed for query
# processing. The user must have the bigquery.jobs.create permission on
# this project to run a query. See:
# https://cloud.google.com/bigquery/docs/access-control#permissions

client = bigquery.Client(project=project, credentials=credentials)

Expand Down

0 comments on commit 906f682

Please sign in to comment.