Registry / devops / that-depends

that-depends

JSON →
library3.9.2pypypiunverified

A simple dependency injection framework for Python, supporting both sync and async providers, scoped contexts, and autowiring. Current version 3.9.2, actively maintained with frequent releases.

pip install that-depends
INSTALL
IMPORT
SIG · THAT-DEPENDS
T
that-depends
devopspythonv3.9.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Container
from that_depends import Container
from that_depends import container

Basic setup with container registration and dependency injection.

import os from that_depends import container, Provide, inject class MyService: async def run(self) -> str: return f"Hello {os.environ.get('NAME', 'World')}" # Manually create provider container.register(MyService) @inject async def main(service: MyService = Provide[MyService]): result = await service.run() print(result) # Run import asyncio asyncio.run(main())
Debug
Known issues
gotchaContainer must be imported as `container` (lowercase), not `Container`. The class is not directly exposed.
fix
Use `from that_depends import container` instead of `from that_depends import Container`.
affects: >=3.0.0
breakingIn version 3.0.0, the API was significantly redesigned. Old patterns like `from that_depends import Providers` or `register_singleton` no longer work.
fix
Check the migration guide. Use new `container.register()` and `Provide` annotations.
affects: >=3.0.0
deprecatedThe `@inject` decorator will be removed in a future version. Use `Provider` annotations directly or `container.resolve()`.
fix
Prefer `service = container.resolve(MyService)` over `@inject`.
affects: >=3.5.0
gotchaAsync providers require `await container.resolve()` or `await` in async context. Calling sync resolve on async provider leads to RuntimeError.
fix
Ensure you `await` when resolving async providers, e.g., `service = await container.resolve(MyService)`.
affects: all
Upgrade
Version history
3.9.2latest on PyPI · released Mar 4, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
10
Amazon
1
Resources

No resource links recorded.

that-depends — pip install that-depends · libregistry