GoogleCloudPlatform / GoogleCloudPlatform/python-docs-samples
firestore: samples should include client creation
- 主要语言
- Jupyter Notebook
- 星标
- 8.1k
- 派生
- 6.7k
- 平均合并
- 4 天 2 小时
- 30 天内合并 PR
- 16
描述
Currently, we have [one sample for creating a client](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/4282aa905763af06354225ae0f422c09201b41da/firestore/cloud-async-client/snippets.py#L27), and the others [assume the client already exists](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/4282aa905763af06354225ae0f422c09201b41da/firestore/cloud-async-client/snippets.py#L36).
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
贡献指南
评估
这个 Issue 还没有评估数据。