From efeb0e10e5f754604b89495e2d3f88e4047cf315 Mon Sep 17 00:00:00 2001 From: Craig Labenz Date: Fri, 9 Jul 2021 12:58:22 -0700 Subject: [PATCH 1/3] clarified reference to project parameter --- firestore/cloud-async-client/snippets.py | 5 +++-- firestore/cloud-client/snippets.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/firestore/cloud-async-client/snippets.py b/firestore/cloud-async-client/snippets.py index f3843ca021b..24944be94b4 100644 --- a/firestore/cloud-async-client/snippets.py +++ b/firestore/cloud-async-client/snippets.py @@ -20,8 +20,9 @@ async def quickstart_new_instance(): # [START firestore_setup_client_create_async] from google.cloud import firestore - # Project ID is determined by the GCLOUD_PROJECT environment variable - db = firestore.AsyncClient() + # The `project` parameter is optional and if not supplied will + # fall back to your gcloud project configuration. + db = firestore.AsyncClient(project='my-project-id') # [END firestore_setup_client_create_async] return db diff --git a/firestore/cloud-client/snippets.py b/firestore/cloud-client/snippets.py index fe974d5e439..8ece91fa385 100644 --- a/firestore/cloud-client/snippets.py +++ b/firestore/cloud-client/snippets.py @@ -23,8 +23,9 @@ def quickstart_new_instance(): # [START firestore_setup_client_create] from google.cloud import firestore - # Project ID is determined by the GCLOUD_PROJECT environment variable - db = firestore.Client() + # The `project` parameter is optional and if not supplied will + # fall back to your gcloud project configuration. + db = firestore.Client(project='my-project-id') # [END firestore_setup_client_create] return db From aa5c302d7da7bc0a522ddea2f2184cbda7cdd8d6 Mon Sep 17 00:00:00 2001 From: Craig Labenz Date: Mon, 12 Jul 2021 16:42:16 -0700 Subject: [PATCH 2/3] refined comment for project parameter --- firestore/cloud-client/snippets.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/firestore/cloud-client/snippets.py b/firestore/cloud-client/snippets.py index 8ece91fa385..16f89c487fc 100644 --- a/firestore/cloud-client/snippets.py +++ b/firestore/cloud-client/snippets.py @@ -23,8 +23,9 @@ def quickstart_new_instance(): # [START firestore_setup_client_create] from google.cloud import firestore - # The `project` parameter is optional and if not supplied will - # fall back to your gcloud project configuration. + # The `project` parameter is optional and represents which project the client + # will act on behalf of. If not supplied, the client falls back to the default + # project inferred from the environment. db = firestore.Client(project='my-project-id') # [END firestore_setup_client_create] From f137c2dcd760f87ea020e4e8901b82730af89d33 Mon Sep 17 00:00:00 2001 From: Craig Labenz Date: Tue, 13 Jul 2021 09:49:18 -0700 Subject: [PATCH 3/3] updated async comment to match --- firestore/cloud-async-client/snippets.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/firestore/cloud-async-client/snippets.py b/firestore/cloud-async-client/snippets.py index 24944be94b4..24f873d8504 100644 --- a/firestore/cloud-async-client/snippets.py +++ b/firestore/cloud-async-client/snippets.py @@ -20,8 +20,9 @@ async def quickstart_new_instance(): # [START firestore_setup_client_create_async] from google.cloud import firestore - # The `project` parameter is optional and if not supplied will - # fall back to your gcloud project configuration. + # The `project` parameter is optional and represents which project the client + # will act on behalf of. If not supplied, the client falls back to the default + # project inferred from the environment. db = firestore.AsyncClient(project='my-project-id') # [END firestore_setup_client_create_async]