Today, the way module are exposed to python is not really ergonomic as 1 root module is created for each terraform provider:
from cdktf_cdktf_provider_docker.image import Image
from cdktf_cdktf_provider_docker.container import Container
from cdktf_cdktf_provider_docker.provider import DockerProvider
Python is (one of the?) only implementation to have it implemented like this.
It would be interesting to migrate (or at least make it compatible with a non breaking way) with native package namespaces to allow a more natural naming
This would allow for example to have this kind of more natural and flexible imports
from cdktf.cdktf.provider.docker.image import Image
from cdktf.cdktf.provider.docker.container import Container
from cdktf.cdktf.provider.docker.provider import DockerProvider
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
Today, the way module are exposed to python is not really ergonomic as 1 root module is created for each terraform provider:
Python is (one of the?) only implementation to have it implemented like this.
It would be interesting to migrate (or at least make it compatible with a non breaking way) with native package namespaces to allow a more natural naming
This would allow for example to have this kind of more natural and flexible imports
References
https://packaging.python.org/en/latest/guides/packaging-namespace-packages
https://peps.python.org/pep-0420/
Help Wanted
Community Note