You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
What's the difference with python-dependency-injector? #207
I do not intend to dismiss your work; however, could you clarify how this package differs from python-dependency-injector? After reviewing the documentation for your project, it appears to share some similarities with the package I mentioned. I would appreciate an explanation of the key distinctions between the two.
To reiterate, this question is asked in good faith, and I recognize that your project may offer unique features or design choices.
I will attempt to make an unbiased comparison, of course I encourage to take this comparison
with a grain of salt, since as one of the maintainers of this repository I will naturally be biased.
The two packages have some similarity because I believe initially the purpose of this package was to be a simplified replacement for dependency-injector when that was left unmaintained for ~2 years.
Relevant versions:
depedency-injector==4.48.3 that-depends==3.9.1
Overview
Both packages have a similar API with a global Container and then marking DI via @inject and Provide.
Under the hood implementation is very different for both packages (if that's relevant for you), but they support
many similar features, including async and sync injection, a multitude of providers, overriding, etc.
The major difference is that dependency-injector supports and requires wiring to work correctly, while that-depends
does not support this feature. In exchange, that-depends provides comprehensive context/state and scope management for
select providers.
Activity
xelandernt commentedon Jan 18, 2026
I will attempt to make an unbiased comparison, of course I encourage to take this comparison
with a grain of salt, since as one of the maintainers of this repository I will naturally be biased.
The two packages have some similarity because I believe initially the purpose of this package was to be a simplified replacement for
dependency-injectorwhen that was left unmaintained for ~2 years.Relevant versions:
depedency-injector==4.48.3that-depends==3.9.1Overview
Both packages have a similar API with a global
Containerand then marking DI via@injectandProvide.Under the hood implementation is very different for both packages (if that's relevant for you), but they support
many similar features, including async and sync injection, a multitude of providers, overriding, etc.
The major difference is that
dependency-injectorsupports and requireswiringto work correctly, whilethat-dependsdoes not support this feature. In exchange,
that-dependsprovides comprehensive context/state and scope management forselect providers.
Major differences
dependency-injectorthat-dependsdependency-injectorthat-dependsMinor differences
dependency-injectorthat-dependsSimilarities
dependency-injectorthat-dependsDI-anywhere?string-injectionPerformance
If performance of the DI matters to you, then
dependency-injectoris faster forsyncinjections.My system specs:
Benchmarks
dependency-injector:that-depends:Results
dependency-injectorthat-dependsdependency-injectoris ~3x fasterMisc
Other, perhaps relevant comparisons.
Information collected on the 18.01.2026
dependency-injectorthat-dependstests/typing