JohnPaton / airbase

🌬 An easy downloader for the AirBase air quality data.
https://airbase.readthedocs.io
MIT License
8 stars 4 forks source link

Implement client for download api #56

Closed JohnPaton closed 4 days ago

JohnPaton commented 3 weeks ago

This needs cleaned up, type hinted, tested, etc. But what do you think about organizing the code like this @avaldebe? I think it's cleaner to have one fully async internal client that contains all async methods, and then have user-facing functions that use the client under the hood to do the work and wait for it to complete. The client will also handle connection sharing and resource limits.

Diff to your branch

JohnPaton commented 3 weeks ago

Ah asyncio shennanigans in the tests, I'll look into it.

JohnPaton commented 3 weeks ago

Tests are good now except existing integration tests for the old service, which are failing.

Still to do in future PRs:

JohnPaton commented 4 days ago

Closing in favour of #54