Skip to main content

Simple Dependency Injection framework

Project description

"That Depends"

Test Coverage MyPy Strict pyrefly Supported versions PyPI Downloads GitHub stars libs.tech recommends llms.txt

Dependency injection framework for Python.

Starting a new project? Also consider modern-di, the newer DI framework from the same author with a smaller core and per-framework integration packages. that-depends remains fully supported — see Ecosystem below.

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:

that-depends remains actively maintained — see the migration guide if you want to move existing projects across.

📚 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

that_depends-4.0.0.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

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

that_depends-4.0.0-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

Details for the file that_depends-4.0.0.tar.gz.

File metadata

  • Download URL: that_depends-4.0.0.tar.gz
  • Upload date:
  • Size: 31.0 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 that_depends-4.0.0.tar.gz
Algorithm Hash digest
SHA256 8fc68094cd0a77b3bdfedc3eeb2bdf84cafda1bc6aa12af830c493305f94fe7c
MD5 8ac58f37f0b03885416f3f791fdcede5
BLAKE2b-256 4a8bedd1c497ca51edad0ed4c2f4e9a7bbf3c2d140bcf54711e9893977453101

See more details on using hashes here.

File details

Details for the file that_depends-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: that_depends-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 43.9 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 that_depends-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7761403f62ff98663b0eb63c7535aa5b29c0cf3472ae2e1d3982032dc691973a
MD5 0716e8a402c402fd53f5566d0106da1b
BLAKE2b-256 e5c8f2d2bf948d856eae2308e4fc9a343d98d4205f37c9f0e448dfdea2bd1168

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