httplib2 caching for requests
Project description
CacheControl is a port of the caching algorithms in httplib2 for use with requests session object.
It was written because httplib2’s better support for caching is often mitigated by its lack of thread safety. The same is true of requests in terms of caching.
Quickstart
import requests
from cachecontrol import CacheControl
sess = requests.session()
cached_sess = CacheControl(sess)
response = cached_sess.get('https://google.com')
If the URL contains any caching based headers, it will cache the result in a simple dictionary.
For more info, check out the docs
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
Built Distribution
File details
Details for the file cachecontrol-0.14.1.tar.gz
.
File metadata
- Download URL: cachecontrol-0.14.1.tar.gz
- Upload date:
- Size: 28.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06ef916a1e4eb7dba9948cdfc9c76e749db2e02104a9a1277e8b642591a0f717 |
|
MD5 | a4d0596a36c2601a1ea72cfcad5de87a |
|
BLAKE2b-256 | d223db12e0b6b241e33f77f7cce01a06b4cc6f8071728656cc0ea262d2a14dad |
Provenance
The following attestation bundles were made for cachecontrol-0.14.1.tar.gz
:
Publisher:
release.yml
on psf/cachecontrol
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
cachecontrol-0.14.1.tar.gz
- Subject digest:
06ef916a1e4eb7dba9948cdfc9c76e749db2e02104a9a1277e8b642591a0f717
- Sigstore transparency entry: 146567193
- Sigstore integration time:
- Predicate type:
File details
Details for the file cachecontrol-0.14.1-py3-none-any.whl
.
File metadata
- Download URL: cachecontrol-0.14.1-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65e3abd62b06382ce3894df60dde9e0deb92aeb734724f68fa4f3b91e97206b9 |
|
MD5 | c00823864344174ad2f3c951eab12f60 |
|
BLAKE2b-256 | f1aa481eb52af52aae093c61c181f2308779973ffd6f0f5f6c0881b2138f3087 |
Provenance
The following attestation bundles were made for cachecontrol-0.14.1-py3-none-any.whl
:
Publisher:
release.yml
on psf/cachecontrol
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
cachecontrol-0.14.1-py3-none-any.whl
- Subject digest:
65e3abd62b06382ce3894df60dde9e0deb92aeb734724f68fa4f3b91e97206b9
- Sigstore transparency entry: 146567197
- Sigstore integration time:
- Predicate type: