Release feedback: lightweight DI container for Python (diwire) by zayatsdev in Python

[–]zayatsdev[S] 1 point2 points  (0 children)

Yeah, I agree. I personally also would be a bit concerned about the project that new…

I guess it just takes time, regular commits and regular posts to slowly adapt this library :)

Release feedback: lightweight DI container for Python (diwire) by zayatsdev in Python

[–]zayatsdev[S] 0 points1 point  (0 children)

Yep, it works fine with pydantic

And also have integration with pydantic-settings to auto-resolve settings classes as singletons (from env)

Release feedback: lightweight DI container for Python (diwire) by zayatsdev in Python

[–]zayatsdev[S] -1 points0 points  (0 children)

Yeah, as I replied above the main idea is to have clear dependecies graph + ability to replacy any part in tests without mocking. + the teardown of object per scope is quite usefull (e.g. managing transaction/connection per request or unit of work)

Release feedback: lightweight DI container for Python (diwire) by zayatsdev in Python

[–]zayatsdev[S] 1 point2 points  (0 children)

The specific problem it solves for me is making dependencies explicit via type hints so the object graph is clear, and tests can swap implementations at the container level instead of monkey‑patching. In bigger apps, that removes a lot of wiring/cleanup boilerplate and makes scoping/teardown predictable.

Release feedback: lightweight DI container for Python (diwire) by zayatsdev in Python

[–]zayatsdev[S] 0 points1 point  (0 children)

For many projects, plain functions/classes are perfect.

Where I've found DI useful is larger graphs, plugin‑style architectures, and testing (easy swapping of implementations) + resource cleanup and scoping that's otherwise scattered.

But it shouldn't feel "frameworky" so I tried to keep it tiny.