googleapis / googleapis/google-cloud-python
Generate non-empty `/services/__init__.py` file
@ohmayr já está trabalhando nisso.
Desde 19/3/2025.
- 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
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Avaliação
Esta issue ainda não foi avaliada.