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

Use reflection to simplify dependency injection #306

Open
naschorr opened this issue Oct 19, 2022 · 0 comments
Open

Use reflection to simplify dependency injection #306

naschorr opened this issue Oct 19, 2022 · 0 comments
Assignees

Comments

@naschorr
Copy link
Owner

naschorr commented Oct 19, 2022

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!

@naschorr naschorr self-assigned this Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant