codeforIATI / iatikit

🐨 A toolkit for using IATI data
https://iatikit.readthedocs.io
MIT License
6 stars 0 forks source link

Add retries to download functions #59

Closed tillywoodfield closed 6 months ago

tillywoodfield commented 6 months ago

Add retries to top-level functions in utils.download to mitigate occasional connection errors.

https://github.com/codeforIATI/iatikit/issues/58

Also relates to https://github.com/codeforIATI/iati-tables/issues/37

andylolz commented 6 months ago

Adding a retry loop is definitely a good idea!

I think this can be done without an extra dependency, though… I’m pretty sure requests has something for retrying built in. Is that something you’d be happy to look at using, @tillywoodfield?

Happy for a PR, but I’d rather avoid the extra dependency if possible.

tillywoodfield commented 6 months ago

Hi @andylolz, no problem that makes sense, I'm happy to rework it

andylolz commented 6 months ago

Version 3.4.0 is now on pypi, and includes this feature: https://pypi.org/project/iatikit/3.4.0/

tillywoodfield commented 6 months ago

Thanks @andylolz!