Idea:
I suggest adding the ability to disable lazy dependency loading for the 'provide' function or globally for the entire 'Provider'
How is it supposed to work?
When creating a new container, create all dependencies with the 'lazy=False' flag and add them to the cache.
Why do you need it?
Create resource-intensive sessions or pools, as well as detect errors early when creating dependencies and protect against errors during code execution
How I see it in the code
Provide
class MyProvider(Provider)
a = provide(A, scope=Scope.App, lazy=False)
Provider
class MyProvider(Provider)
lazy = Fasle
a = provide(A, scope=Scope.App)
Idea:
I suggest adding the ability to disable lazy dependency loading for the 'provide' function or globally for the entire 'Provider'
How is it supposed to work?
When creating a new container, create all dependencies with the 'lazy=False' flag and add them to the cache.
Why do you need it?
Create resource-intensive sessions or pools, as well as detect errors early when creating dependencies and protect against errors during code execution
How I see it in the code
Provide
Provider