-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for async injectables #107
Comments
cool |
What do you think of PEP593 |
Hi @Euraxluo, thanks for the bringing this to attention! Indeed I'm thinking of how to best support typing.Annotated in this framework. I do believe though that this should be discussed in a separated issue from this one regarding async injectables. |
any updates on planning to support async dependencies? |
I'll start working on some other issues listed in this project where there is already a clear implementation path but we can talk about this issue to find a good solution so I can work on it right after. @aryaniyaps it would be great to hear from you if you have any specific suggestions or external examples to enrich this discussion. Or even just your need so we can have a clear set of scenarios we want to cover. |
I don't have any specific suggestions in mind, but async support would be nice as the python ecosystem has adapted more and more of the async await syntax Off the top of my head, the framework could use anyio to resolve the async dependencies by using a iscouroutine check, maybe? This way support is extended to multiple io backends like asyncio and trio! |
It's currently not ideal to use this library together with Python's async/await.
We should support asynchronous constructors and factories.
Async constructors are also a bigger problem since one cannot declare an async
__init__
method without bending some snakes. This calls for ways to construct and/or setup an injectable other than relying solely on__init__
.The text was updated successfully, but these errors were encountered: