Fang: Pythonic dependency injection
summary
Fang is a ~300-line Python DI library that actually runs: about 300 lines, with resources identified by names (strings) and implementations registered as no-arg provider callables. Dependencies attach via a decorator and get injected by unpacking into functions or constructors; providers are registered at program entry so import-time singletons stay replaceable. Tests must clear and re-register providers between cases. Planned features include namespaces, stdlib/third‑party adapters, and publishing to PyPI.
AI-written summary · about
chapters (5)
related talks
46mDependency injection is your friend
01h 01mFrom F# to Python with Fable
19mFlow-based programming made easy with PyF 2.0
24mAn FFI between Gambit Scheme and CPython
24m"A Confession of My Python Sins"
28mManaging Python Dependencies at scale
07mLightning Talk – Python Dependencies the Right Way
30mLazy imports and the art of interpreter procrastination
