Skip to content
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 requests #6

Closed
s-celles opened this issue Nov 21, 2020 · 0 comments · Fixed by #7
Closed

Caching requests #6

s-celles opened this issue Nov 21, 2020 · 0 comments · Fixed by #7

Comments

@s-celles
Copy link
Contributor

Hello @andreztz,

I noticed you are using python-requests.

Adding a cache mechanism (to avoid too much requests to radio-browser API) can be done quite easily using requests-cache

See how it's being used in https://pandas-datareader.readthedocs.io/en/latest/cache.html passing session=None by default or passing session=requests_cache.CachedSession(...)

See also
https://github.com/pydata/pandas-datareader/blob/adb67b2e959f2060a9db18f8b343d06e917f23da/pandas_datareader/_utils.py#L56-L60

Kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant