Skip to main content

Wrapper over requests package to support etag caching by default

Project description

requests-etag

Wrapper over requests package to support etag caching by default

Install

pip install requests-etag

Usage

>>> import requests_etag
>>> res = requests_etag.get('https://example.com/')
>>> res.status_code
200
>>> len(res.text)
1527903
>>> res = requests_etag.get('https://example.com/') # cached
>>> res.status_code
304
>>> len(res.text)
1527903

Configuration

import requests_etag

requests_etag.config['dir'] = 'mycache'
requests_etag.config['db'] = 'db.sqlite3'

Project details


Download files

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

Source Distribution

requests-etag-1.0.0.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

requests_etag-1.0.0-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page