fmiopendata icon indicating copy to clipboard operation
fmiopendata copied to clipboard

Suggestion: add async support and potentially move from `requests` to `httpx`

Open p3zq opened this issue 11 months ago • 1 comments

Hi all,

I appreciate the effort you've put into this project. I was wondering if you are open for contributions that add asynchronous support for the library. If so, would you have any guidelines or concerns before I start? I'm happy to raise a PR and hear your thoughts.

My initial thinking would be to add relevant async equivalent functions with _async suffix to maintain backwards compatibility.

lightning1 = download_stored_query("fmi::observations::lightning::simple")
lightning2 = await download_stored_query_async("fmi::observations::lightning::simple")

This potentially would require switching from requests to e.g. httpx.

p3zq avatar Feb 14 '25 20:02 p3zq

Sorry for the very late response!

Please, do create a PR for the async variants! I don't have any experience with the asynchronous downloading, but see that it can be very useful. I'll try to remember and check the repository more regularly during the summer.

pnuu avatar Jun 27 '25 08:06 pnuu