that-depends
that-depends copied to clipboard
DI-framework, inspired by python-dependency-injector, but without wiring. Python 3.12 is supported
Here: 1. https://github.com/modern-python/that-depends/blob/main/that_depends/container.py#L13 2. https://github.com/modern-python/that-depends/blob/main/that_depends/container.py#L19
https://github.com/ets-labs/python-dependency-injector/pull/765
1. Injection 2. Frameworks examples 3. Resolving class without provider
Caught a regression after 1.15.0 (via #67). Works fine on 1.14.1. If an async resource has any IO in creator function, this function will be caused twice resulting in different...
Currently, `container_context()` resets/reinitializes the whole context. This makes it hard to manage resources with different lifetimes. As a theoretical workaround, it is possible to build an `initial_context` that keeps resources...
We should enable support for python 3.13. To-do: - Make sure that all tests pass with 3.13. - Update `pyproject.toml` - Update `docs` - Update `workflows`
`Resource` provider expects callable object that returns either `Iterable` or `AsyncIterable` that yields only one element (the result value for provider attribute in DI container). I think it would be...
Add example of usage with sqlalchemy and ContextResource