Solid Principles, Python.
for them. The dependency tree is configured in a config file and resolved by the framework when needed. Personally, I favor writing out the dependency tree in source code. This gives me full control over the life span of each and every object in the code. As always, there is a solution for each