, , (, , ), , , __init__.py :
__all__ = ["acme1", "acme2", "acme3", "acme4", "acme5", "acme6"]
, , ... import *
from providers import *
, ,
acme1.get()
acme2.get()
If you have enough modules in the supplier package, which becomes a problem when filling out the list __all__, you may want to split them into smaller packages or save the data in a different way. I personally would not want to deal with dynamic importing schennagins every time I would like to reuse a package.
source
share