Trio - Python library for async concurrency and I/O #8138
Replies: 7 comments
-
I guess most FastAPI users use it with uvloop which trio is not compatible with: python-trio/trio#138 |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help here @haizaar ! Nice investigation. I think @haizaar is right, by checking that issue. |
Beta Was this translation helpful? Give feedback.
-
This is a great place to mention that you can use hypercorn, which seems to support trio (I haven't tested it personally though). |
Beta Was this translation helpful? Give feedback.
-
Maybe, again maybe, if you configure uvicorn to use asyncio instead of uvloop as its loop, trio will work with it and consequently, with FastAPI Of course that's in case one does not need absolutely cutting edge performance. |
Beta Was this translation helpful? Give feedback.
-
So, FastAPI uses Starlette's Prior to FastAPI supporting Trio, we would need Starlette itself to support Trio. But that's probably quite a lot of work there. Also, if Starlette supported Trio that would be automatically inherited by FastAPI. You can track it here: encode/starlette#811 |
Beta Was this translation helpful? Give feedback.
-
Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues. |
Beta Was this translation helpful? Give feedback.
-
there's some progress on this here: encode/starlette#1157 |
Beta Was this translation helpful? Give feedback.
-
Description
Hello!
I'm using Hypercorn with uvloop.
I'd like to use Hypercorn with trio, but the program doesn't start when i switch uvloop by trio.
Do you have plans to implement trio?
Thank's!
PS: Nice work.
Beta Was this translation helpful? Give feedback.
All reactions