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.
Metadata
Release files for that-depends 4.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| that_depends-4.1.1.tar.gz | 34.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| that_depends-4.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 81.2 kB
Release files / that_depends-4.1.1.tar.gz
| Download URL | that_depends-4.1.1.tar.gz |
|---|---|
| Size | 34.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfd335a9a9ca33263b00f06d1d1a1cfd9166fcf108aaebaefa1ee5b4fbdc2cea
|
|
BLAKE2b-256 checksum How to use checksums |
867a965f8ed7e573e8c93c83a61dd9f9c5e72f1a59b12e65653cbb1c10f1a5aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / that_depends-4.1.1-py3-none-any.whl
| Download URL | that_depends-4.1.1-py3-none-any.whl |
|---|---|
| Size | 46.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4229482315633db4a900d782f4113463b44c2dfce7f318117760517db2312c9
|
|
BLAKE2b-256 checksum How to use checksums |
e5eca31832b0fd115a67cafa242d54163540b94847e48c141a3efe85a96cb290
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|