-
https://that-depends.readthedocs.io/introduction/fastapi.html
In the above example, I need that the instance of |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
@JobaDiniz Hi,
container = Container()
container.wire(modules=[__name__]) |
Beta Was this translation helpful? Give feedback.
-
@JobaDiniz |
Beta Was this translation helpful? Give feedback.
-
I haven't solved. |
Beta Was this translation helpful? Give feedback.
-
@app.get("/")
async def read_root(request: Request) -> datetime.datetime:
# and here build dependency and pass data from request to needed methods
some_object = await container.DIContainer.dependent_factory()
some_object.some_method(request) |
Beta Was this translation helpful? Give feedback.
@JobaDiniz It possible to do this now like this: