Dependency Injection framework with IOC-container and scopes
Project description
"Modern-DI"
| Project | Badges |
|---|---|
| common | |
| modern-di | |
| modern-di-fastapi | |
| modern-di-faststream | |
| modern-di-litestar | |
| modern-di-typer | |
| modern-di-pytest |
modern-di is a python dependency injection framework which supports the following:
- Automatic dependencies graph based on type annotations
- Also, explicit dependencies are allowed where needed
- Scopes and context management
- Python 3.10+ support
- Fully typed and tested
- Integrations with
FastAPI,FastStream,LiteStarandTyper - Pytest integration (
modern-di-pytest) — turns any DI dependency into a pytest fixture
Usage examples:
- with LiteStar - litestar-sqlalchemy-template
- with FastAPI - fastapi-sqlalchemy-template
Part of modern-python
Browse the full list of templates and libraries in
modern-python — see the org profile for the
categorized index.
📚 Documentation
📦 PyPi
📝 License
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
modern_di-2.14.0.tar.gz
(11.5 kB
view details)
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 modern_di-2.14.0.tar.gz.
File metadata
- Download URL: modern_di-2.14.0.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba58b84b881108f47e272f5ad10a36ff8a73d4b332b74640bc8b80a54c0270a8
|
|
| MD5 |
6e2dfe55c73efaa2ec9cd2e7e7743068
|
|
| BLAKE2b-256 |
b195564bcc260f4602d569f012d2211c9374f075b96f565c2d5fb854a24587e7
|
File details
Details for the file modern_di-2.14.0-py3-none-any.whl.
File metadata
- Download URL: modern_di-2.14.0-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05ec43d27dbf8e713739d4890417395ba613e32d23657da5e385a52c7aa51242
|
|
| MD5 |
02fd8354c2ed0c627bc86658e07183c0
|
|
| BLAKE2b-256 |
6d8b62e2363c1770c45f9863636bfb6125cd53ef0597d28d36024009e785feaf
|