Async support for Python SDK


We’re slowly migrating our code from manually constructed API calls to using your SDK, but a major drawback for us is having to call the API synchronously in the background.
Is there any chance you guys will come up with async support in the near future, similarly to what does, for example?
It seem to me that it should be relatively easy with openapi generator that you’re using already.

Hi @mikulas.mrva

Assuming you are looking to make multiple requests at once, would you be able to use threads to run parallel requests?

I could, but it’s quite a bit of extra work.
My context is that I’m fetching a lot of data from multiple sources, and everything else supports async so far (see dexguru-sdk, for example), so I can call asyncio.gather and run everything concurrently. So I can make those calls using wrappers such as sync_to_async, but native async support would be cleaner. So far the calls to Moralis API were done via aiohttp, so I would love to swap them in-place for the SDK.
I’m assuming I’m not the only person to ask for this, but that’s up to you to judge, of course, as the dev effort required would not be entirely trivial.

Hi @mikulas.mrva

Yeah, understand the issue. Let me share this with the dev team.

1 Like