GoogleCloudPlatform / python-docs-samples

Code samples used on cloud.google.com
Apache License 2.0
7.08k stars 6.34k forks source link

firestore: samples should include client creation #11993

Open daniel-sanche opened 2 days ago

daniel-sanche commented 2 days ago

Currently, we have one sample for creating a client, and the others assume the client already exists.

This causes problems, because we have both a sync and an async client, and using the wrong client leads to errors. When the samples are viewed stand-alone, they don't give the proper context

We should instead include the creation of the client (and any important imports) as part of each sample, so they can better stand alone