that-depends icon indicating copy to clipboard operation
that-depends copied to clipboard

DI-framework, inspired by python-dependency-injector, but without wiring. Python 3.12 is supported

Results 15 that-depends issues
Sort by recently updated
recently updated
newest added

Common difficulty which currently requires some kind of "work-around" ```python @app.get("/") async def endpont(r: Request, value = fastapi.Depends(Container.provider)): ... ``` Where the provider is actually a dependent of the `Request`...

enhancement
v3

It would be a (small) DX boost not to have to write lifespan yourself. Applicable for FastAPI, Litestar and FastStream. ```python def create_container_lifespan(*containers: that_depends.BaseContainer): @contextlib.asynccontextmanager async def lifespan(*_args: typing.Any, **kwargs:...

enhancement
good first issue

Right now, all `Context` providers use `ContextVars` as storage. It would be good to have an alternative, for example, if someone needs more reliable persistence when working with asyncio. To-do:...

enhancement
v4

Some providers naming can be improved to make their intent more clear: Current suggestions: - `State` --> `ContextState`

documentation
v4

Currently, `None` is the default value in most places where an argument can be omitted. In such cases, `None` just means the value has been left unset. It would be...

v4