GoogleCloudPlatform / GoogleCloudPlatform/python-docs-samples

firestore: samples should include client creation

Đang mở
#11,993 0 bình luận 1 reaction 1 người được giao Được giao cho @daniel-sanche Xem trên GitHub
api: firestore priority: p3 samples triage me type: feature request
Ngôn ngữ chính
Jupyter Notebook
Star
8.1k
Fork
6.7k
Merge trung bình
4 ngày 2 giờ
Pull request đã merge (30 ngày)
16

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.