diff --git a/google/cloud/firestore_v1/base_client.py b/google/cloud/firestore_v1/base_client.py index 345e061428..a7c8a97274 100644 --- a/google/cloud/firestore_v1/base_client.py +++ b/google/cloud/firestore_v1/base_client.py @@ -131,7 +131,8 @@ def __init__( if credentials is None: credentials = AnonymousCredentials() if project is None: - project = _DEFAULT_EMULATOR_PROJECT + # extract project from env var, or use system default + project = os.getenv("GCLOUD_PROJECT", _DEFAULT_EMULATOR_PROJECT) super(BaseClient, self).__init__( project=project,