Basically, do it like Angular. Type hinted dependencies are specified in the class' __init__ signature. Those dependencies then influence how the module manager generates the dependency graph and thus how and when modules are loaded.
There's probably an industry standard DI framework for Python already, but this is more fun!
Basically, do it like Angular. Type hinted dependencies are specified in the class'
__init__signature. Those dependencies then influence how the module manager generates the dependency graph and thus how and when modules are loaded.There's probably an industry standard DI framework for Python already, but this is more fun!