OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
20.74k stars 6.32k forks source link

Python: Creating an async client #18407

Open idan3 opened 3 months ago

idan3 commented 3 months ago

I see there is an option to give the library=asyncio in the CONFIG OPTIONS to get an async client, but its not clear enough will it be an async client? Can I create an SDK for both async and sync requests?

wing328 commented 3 months ago

if i remember correctly, the default output from python client generator supports both async and sync.

why not generate both (with and without library=asyncio) to give these a try?

idan3 commented 3 months ago

I do not think the default supports both but I thought maybe I was missing something. Can someone give me a conclusive answer about that? If I understand correctly I get a sync client with library=urllib3 and async one with library=asyncio.

The disadvantage of generating both is that it will create them as two separate projects.