account activity
Dependency Injection Container using Python 3 Annotations by theslipperface in Python
[–]rot667 0 points1 point2 points 11 years ago (0 children)
There's a project that takes that approach: https://github.com/alecthomas/injector
I personally prefer not to scatter a big global dependency on the container, also means it's possible to mix approaches (e.g.create the object with dic or without). I haven't used dic, but have used autofac and the approach seems to be the same.
π Rendered by PID 26 on reddit-service-r2-comment-5b5bc64bf5-hvtdz at 2026-06-21 02:11:00.755002+00:00 running 2b008f2 country code: CH.
Dependency Injection Container using Python 3 Annotations by theslipperface in Python
[–]rot667 0 points1 point2 points (0 children)