Closed allrobot closed 3 weeks ago
Unfortunately (or fortunately?) trio doesn't natively support asyncio libraries. You can use something like trio-asyncio to run asyncio libraries in trio or maybe try an http client that supports trio like httpx.
+1 for https://www.python-httpx.org/ instead of aiohttp. Their feature sets largely overlap.
See https://trio.readthedocs.io/en/stable/awesome-trio-libraries.html for more suggestions on trio/anyio-compatible libraries
It report error:
I must use asyncio code:
It can work.