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.17.0.tar.gz (15.2 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.17.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: modern_di-2.17.0.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.17.0.tar.gz
Algorithm Hash digest
SHA256 e96a338cd2d16ae5288b329a120effbbd20a3f764bdd629e49405cbc7f7b7d53
MD5 f4e1078eed8571bd5f046d5e4000371c
BLAKE2b-256 d4ab65e409534248f20cf84749452448ec0d6db083688630deb98fc3782500fd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: modern_di-2.17.0-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4500fae1c588f00c608e583de1ccad8fe3e3b140be030090a1c70529efa90d6
MD5 e0e86b41b0fbf79f59af7e80902adac0
BLAKE2b-256 ed8f7daeb86b86e951b895fd67c1da20a0a2068317762a4de5b49cac92f3a1af

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