Simple, typed dependency-injection framework for Python
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file that_depends-4.0.2.tar.gz.
File metadata
- Download URL: that_depends-4.0.2.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f3092eb1c88aa66e7ff0f12dfcb180293ea7885f1bccbab9bc72a7dc2b04a3f
|
|
| MD5 |
2b247908a128391bfb15f873b28ef66e
|
|
| BLAKE2b-256 |
b151c906b7c3681a58b43a35f8cf93d6263f1dda5cb0500663763531b5ba5898
|
File details
Details for the file that_depends-4.0.2-py3-none-any.whl.
File metadata
- Download URL: that_depends-4.0.2-py3-none-any.whl
- Upload date:
- Size: 44.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b05f29a2f3425e249c1e96c886f7084faa4a870d70002c0a91fbc851b4d0837
|
|
| MD5 |
8de7b9555705b83d4aab2ff8036ac3e9
|
|
| BLAKE2b-256 |
1e989dcfef5cfe2d98fda01bf5154013c0f3187973682738885bfd62e8cbee01
|