dgilland / omdb.py

Python wrapper around OMDb API (Open Movie Database): http://omdbapi.com
http://omdbpy.readthedocs.org
Other
98 stars 23 forks source link

Make using requests_cache optional with argument #15

Open seitzbg opened 7 years ago

seitzbg commented 7 years ago

Should be pretty easy to drop in requests_cache flag along with parameters for caching. I have a lot of media to look up and it would definitely speed things up and reduce load on the server side!

Something like this seems to work in client.py:

self.session = requests_cache.CachedSession(cache_name='omdbapi_cache', expire_after=604800)

Obviously values for name/expire/backend could be passed in.