requests etag cache
Project description
Installation
$ [sudo] pip install requests-etag-cache
How it works
$REQUESTS_ETAG_CACHE/<url_hash>
$XDG_CACHE_HOME/requests-etag-cache/<url_hash>
by default
Functions
function | __doc__ |
---|---|
requests_etag_cache.clear() |
remove all cache keys |
requests_etag_cache.get(response) |
get cached etag value |
requests_etag_cache.rm(response) |
remove response cache |
requests_etag_cache.save(response) |
save response etag value |
requests_etag_cache.uptodate(response) |
return True if response is cached, else False |
Examples
import requests
import requests_etag_cache
r = requests.get('https://pypi.org/project/requests/')
if not requests_etag_cache.uptodate(r):
...
requests_etag_cache.save(r)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for requests-etag-cache-2019.9.25.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43dfbf158215f8ace8d5a1ac9e1fdc99ebb0cdf1c4626c8d38054a67d8eff5a6 |
|
MD5 | 08687b47cbadc82eb9b12b4628956b2e |
|
BLAKE2b-256 | 3f61d0819613b623a2548e4ffa9c54e7e6328c269780901c0823ead1b7786df4 |