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.
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.2.0
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.2.0.tar.gz | 34.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| that_depends-4.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 81.2 kB
Release files / that_depends-4.2.0.tar.gz
| Download URL | that_depends-4.2.0.tar.gz |
|---|---|
| Size | 34.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05ca5c1c7de51550132dd1ed9ef4f89cc715ee71839f996a8046712b988f8506
|
|
BLAKE2b-256 checksum How to use checksums |
cd55491e8d5503a805ec3286ee5b91c0959d0413a92b4116656c18a7512c4daf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.2.0-py3-none-any.whl
| Download URL | that_depends-4.2.0-py3-none-any.whl |
|---|---|
| Size | 46.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a06267e60fda353be071d7aa7b8dc452d4f79f067e643de6222c624b640f29c0
|
|
BLAKE2b-256 checksum How to use checksums |
2a0d0f36f6b69c95186ecddd2715dda040cc277eb6e0302fd2a2e624b1a90ee2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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}
|