Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate non-empty /services/__init__.py file #2366

Open
BenRKarl opened this issue Mar 19, 2025 · 0 comments
Open

Generate non-empty /services/__init__.py file #2366

BenRKarl opened this issue Mar 19, 2025 · 0 comments
Assignees

Comments

@BenRKarl
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants