Skip to main content

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)

python-readme-generator

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for requests-etag-cache, version 2019.9.25
Filename, size File type Python version Upload date Hashes
Filename, size requests-etag-cache-2019.9.25.tar.gz (1.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page