README.md
June 30, 2026 ยท View on GitHub
Simple, typed dependency injection framework for Python.
It is production-ready and gives you the following:
- Simple async-first DI framework with IOC-container.
- Python 3.10+ support.
- Full coverage by types annotations (mypy in strict mode, pyrefly).
- Inbuilt FastAPI, FastStream and LiteStar compatibility.
- Dependency context management with scopes.
- Overriding dependencies for tests.
- Injecting dependencies in functions and coroutines without wiring.
- Package with zero dependencies.
Installation
pip install that-depends
Ecosystem
that-depends is part of the modern-python family.
If you're starting a new project, consider modern-di โ
the newer DI framework from the same author, with separate framework adapters:
modern-diโ core DI framework with scopesmodern-di-fastapi,modern-di-litestar,modern-di-faststream,modern-di-typer,modern-di-pytest
that-depends remains actively maintained โ see the
migration guide if you
want to move existing projects across.
๐ Documentation
๐ฆ PyPI
๐ License
Part of modern-python
Browse the full list of templates and libraries in
modern-python โ see the org profile for the categorized index.