Skip to main content

Dependency Injection framework with IOC-container and scopes

Project description

"Modern-DI"

Project Badges
common GitHub stars
modern-di Supported versions downloads
modern-di-fastapi Supported versions downloads
modern-di-faststream Supported versions downloads
modern-di-litestar Supported versions downloads
modern-di-typer Supported versions downloads
modern-di-pytest Supported versions downloads

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, LiteStar and Typer
  • Pytest integration (modern-di-pytest) — turns any DI dependency into a pytest fixture

Usage examples:

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.15.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

modern_di-2.15.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file modern_di-2.15.0.tar.gz.

File metadata

  • Download URL: modern_di-2.15.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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

Hashes for modern_di-2.15.0.tar.gz
Algorithm Hash digest
SHA256 f8b89ced63aa7feca7bc0088b6b3b5106af3c3e596b5bfccafdfd2e36bdf6fc6
MD5 cdaa462390752646b3a20196c69aecbc
BLAKE2b-256 6fc67343fd169a3c301a0e569fa1d64a42f913bcf0c30eb97cb3a2ea8ca070a4

See more details on using hashes here.

File details

Details for the file modern_di-2.15.0-py3-none-any.whl.

File metadata

  • Download URL: modern_di-2.15.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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

Hashes for modern_di-2.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c39b1db9d72f4e528a7e68d9de9a451a1bef948ae0cf2d237433af6b884a2bc
MD5 03f5dda958a481aa5cd375e356cc3be4
BLAKE2b-256 63c5276767fdb6aa97e50b881668a74eaf2eaad7d0ead5c40be0c11f21979468

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page