You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The alternative is that there is no container initialization and you can't have several instances of the same container.
the main advantage is that you don't need to write such boilerplate code:
@app.get("/")asyncdefread_root(request: Request) ->datetime.datetime:
# and here build dependency and pass data from request to needed methodssome_object=awaitcontainer.DIContainer.dependent_factory()
some_object.some_method(request)
Activity
lesnik512 commentedon Aug 8, 2024
@JobaDiniz Hi,
the main advantage is that you don't need to write such boilerplate code:
lesnik512 commentedon Aug 8, 2024
@JobaDiniz
2. can you please show how you solve this case in dependency injector?
JobaDiniz commentedon Aug 9, 2024
I haven't solved.
lesnik512 commentedon Aug 9, 2024