8000 docs: Add the firestore_setup_client_create_with_project_id region ta… · sreza/python-docs-samples@3df11db · GitHub
[go: up one dir, main page]

Skip to content

Commit 3df11db

Browse files
Mariattaparthea
andauthored
docs: Add the firestore_setup_client_create_with_project_id region tag (GoogleCloudPlatform#8251)
The Firestore quickstart_new_instance sample can be used to demonstrate setting up client using a project id. With this region tag, we can include it into this doc: https://cloud.google.com/firestore/docs/samples/firestore-setup-client-create-with-project-id Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 7d766cd commit 3df11db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

firestore/cloud-client/snippets.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@
2121

2222
def quickstart_new_instance():
2323
# [START firestore_setup_client_create]
24+
# [START firestore_setup_client_create_with_project_id]
2425
from google.cloud import firestore
2526

2627
# The `project` parameter is optional and represents which project the client
2728
# will act on behalf of. If not supplied, the client falls back to the default
2829
# project inferred from the environment.
2930
db = firestore.Client(project='my-project-id')
31+
# [END firestore_setup_client_create_with_project_id]
3032
# [END firestore_setup_client_create]
3133

3234
return db
@@ -154,7 +156,7 @@ def to_dict(self):
154156
# [END_EXCLUDE]
155157

156158
def __repr__(self):
157-
return(
159+
return (
158160
f'City(\
159161
name={self.name}, \
160162
country={self.country}, \

0 commit comments

Comments
 (0)
0