GoogleCloudPlatform / GoogleCloudPlatform/python-docs-samples

firestore: samples should include client creation

Aberta
#11,993 0 comentários 1 reação 1 responsável Atribuída a @daniel-sanche Ver no GitHub
api: firestore priority: p3 samples triage me type: feature request
Linguagem predominante
Jupyter Notebook
Estrelas
8.1k
Forks
6.7k
Merge médio
4d 2h
PRs com merge (30d)
16

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.