modern-python / that-depends

DI-framework, inspired by python-dependency-injector, but without wiring. Python 3.12 is supported
https://that-depends.readthedocs.io/
MIT License
156 stars 12 forks source link

Export `container_context` from `that_depends` #34

Closed vrslev closed 4 months ago

vrslev commented 4 months ago

I often forget to enter container context when using context resources. When I do, it annoyes me to have to jump up to imports block and add import that_depends.providers manually. To prevent that, I suggest making it available as that_depends.container_context().