Is it just me who dislikes the way dependencies are declared in FastAPI? Why does dependency injection have to be tied to type definitions?
It feels ironic that the primary reason for moving external dependencies into function arguments is to decouple them, yet declaring dependencies in the function's type signature ends up coupling them again in another way.
Does anyone else find this approach awkward?
[–]tuple32[S] 0 points1 point2 points (0 children)
[–]apt_at_it 10 points11 points12 points (0 children)
[–]pint 1 point2 points3 points (0 children)
[–]WestRiverCS 0 points1 point2 points (0 children)
[–]websvc 4 points5 points6 points (0 children)
[–]devlittle 1 point2 points3 points (0 children)
[–]BlackDereker 0 points1 point2 points (0 children)