https://that-depends.readthedocs.io/introduction/fastapi.html In the above example, I need that the instance of |
Answered by
lesnik512
Aug 28, 2024
Replies: 4 comments 1 reply
|
@JobaDiniz Hi,
container = Container()
container.wire(modules=[__name__]) |
0 replies
|
@JobaDiniz |
0 replies
|
I haven't solved. |
0 replies
@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) |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@JobaDiniz It possible to do this now like this: