Skip to main content

Support delayed dependency injection in FastApi to enable app constructor pattern.

Project description

Delayed Dependency Injection in Python

Dependency Container is a Python library that enables a delayed dependency injection approach, allowing you to build your application using an app constructor pattern. It's particularly useful for scenarios where dependencies are defined later in the application lifecycle.

Currently supports FastAPI and FastStream.

Installation

For installation we suggest using uv:

uv add dependency-container

If you wish to use with FastStream:

uv add "dependency-container[faststream]"

Alternatively you can install with pip:

pip install dependency-container

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dependency_container-0.3.0.tar.gz (69.7 kB view details)

Uploaded Source

Built Distribution

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

dependency_container-0.3.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file dependency_container-0.3.0.tar.gz.

File metadata

  • Download URL: dependency_container-0.3.0.tar.gz
  • Upload date:
  • Size: 69.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dependency_container-0.3.0.tar.gz
Algorithm Hash digest
SHA256 37f2bcdd8b6363891063c0408b51155b34a46a17235a61d32a6b6a3384745d57
MD5 6d0f98c65c4421f601ae82b1c64b4fec
BLAKE2b-256 8188ad13b833a29cf0792db34b5414dea09e52655d7fafeef40f05977b683e25

See more details on using hashes here.

Provenance

The following attestation bundles were made for dependency_container-0.3.0.tar.gz:

Publisher: release.yml on KLMatlock/dependency-container

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dependency_container-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dependency_container-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6aba2a04242e6c06d56f0314c6cdf269ea2cf4a242b3fcc2f84e37b8438a0b6
MD5 249e0b0362532677173c2d5463e27102
BLAKE2b-256 786766772f1d4113a43160a25de628b5a9ca3c4d701d33d8f330addbc8e2ca3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dependency_container-0.3.0-py3-none-any.whl:

Publisher: release.yml on KLMatlock/dependency-container

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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