googleapis / googleapis/google-cloud-python

Generate non-empty `/services/__init__.py` file

Aberta
#16,231 1 comentário 0 reações 1 responsável Ver no GitHub

@ohmayr já está trabalhando nisso.

Desde 19/3/2025.

priority: p2 type: feature request
Linguagem predominante
Python
Estrelas
5.4k
Forks
1.8k
Merge médio
2d 23h
PRs com merge (30d)
123

Descrição

Thanks for stopping by to let us know something could be better!

Is your feature request related to a problem? Please describe.

In the Google Ads API we have a number of types that are defined within the service protos, and these types are difficult to import without knowing the name of the file they're defined in. So having a top-level init.py file with each type listed helps with our import logic. We had a similar mechanism in the old Ads templates.

Currently we work around this by manually copying the init.py file under /services/types into /services/ and appending .types to the import paths (see current file)

Describe the solution you'd like

It would be great if this __init__.py file under /services/ was generated automatically.

Describe alternatives you've considered

I considered updating our get_type method logic to handle this inconsistency, but it doesn't seem to work when the /services/__init__.py file is empty.

Additional context
Add any other context or screenshots about the feature request here.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

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.