-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching API requests #52
Comments
thanks for the issue @nleguillarme had a look at that pkg. is it more common for pkg maintainers to build in caching with a pkg like |
Hi @sckott. That's a good question and I do not have enough experience to give you an answer.
I think both could be easily integrated in pygbif by the pkg user himself by allowing the use of a custom session (a CachedSession from requests-cache and/or a session with Retry). |
thanks, and sorry for the delay, will try to get something built in soon ... |
@nleguillarme reinstall from branch uses requests-cache library now, see method |
also, curious if any comments from @peterdesmet @stijnvanhoey @damianooldoni on this ☝️ |
Hi @sckott. Thank you for your work. Everything seem to work fine. I tested some scripts that get info from GBIF and never reached the request limit. When re-running the scripts, all results are obtained from the cache, which dramatically speed up the process. |
Great, glad it works. I'll submit a new version to pypi soon |
Your link helped to solve one of those situations. Thanks @nleguillarme I take the opportunity to ask: I see some info about Thanks |
I think that happens only if previous script runs finished without error. |
sorry, i can't help. I no longer work on this project - & anyway it's been too long and I dont remember this work - hopefully the current maintainers will pop in |
Python 3.7
pygbif 0.3.0
In my application, I send a lot of requests to get info from GBIF backbone taxonomy, sometimes with the same parameters. Ultimately, I plan to download the full taxonomic backbone, but in the meantime, I think it would be great to implement some caching mechanism, for instance using requests-cache.
Anyway, great work on this library. Thanks.
The text was updated successfully, but these errors were encountered: