-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
- It's written that this lib does not have
wiring. What's the alternative and why it does not matter? What do I need to change? - I'm using dead
dependency_injectorfor fastapi. Doesthat-dependssupport passing therequest: Requestinto the dependency?
https://that-depends.readthedocs.io/introduction/fastapi.html
@app.get("/")
async def read_root(
some_dependency: typing.Annotated[
container.DependentFactory,
fastapi.Depends(container.DIContainer.dependent_factory),
],
) -> datetime.datetime:
return some_dependency.async_resource
In the above example, I need that the instance of dependent_factory to have access to the request object of fastapi. How can this be implemented?
Metadata
Metadata
Assignees
Labels
No labels