encode / apistar

The Web API toolkit. 🛠
https://docs.apistar.com
BSD 3-Clause "New" or "Revised" License
5.57k stars 411 forks source link

Doing async requests #681

Open kelvan opened 3 years ago

kelvan commented 3 years ago

Just found out to my surprise that the apistar client does not support async requests. As this project seems rather dead, maybe someone knows a similar one that implement async? did some overriding to achieve it in a hacky way: https://gist.github.com/kelvan/49e3efb99c329b4c2476d49458b19c19

carltongibson commented 3 years ago

Use HTTPX.

hcastilho commented 3 years ago

So the project is indeed dead?

kelvan commented 3 years ago

@carltongibson can you elaborate how I should use httpx? Only way to use httpx here is to not use apistar client and reimplement the whole api client by hand. Using a httpx async client as session in apistar won't work as it does not await it. Using openapi-generator with --library asyncio now to create and package the client in the ci pipeline