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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file requests-etag-1.0.0.tar.gz.

File metadata

  • Download URL: requests-etag-1.0.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for requests-etag-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c2876f7e7b17ebc7e278912ca8994bd07ca86a60a3a8fd96dfee4aeca19ac547
MD5 051eb8247758c7fca4fc58a5b5086f04
BLAKE2b-256 c5ced8f92db779d4eb15e6460d40b0df2a56ba1bbdf69e03a78c64071171781b

See more details on using hashes here.

File details

Details for the file requests_etag-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for requests_etag-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e04aeab3310dc4f4063468aa5460970db4889d1b7776577af5ebf3b6339ae0e
MD5 56a79af19fbcf99b1bf50d6756ce66cc
BLAKE2b-256 a72e8d91e67a6c5641505b013499e08c0236eedd90a04c0cd28d93dd5c0358cc

See more details on using hashes here.

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