Persistent cache for requests library
Project description
requests-cache
Requests-cache is a transparent persistent cache for requests library.
Usage example
Just write:
import requests import requests_cache requests_cache.configure('demo_cache')
And all responses with headers and cookies will be transparently cached to demo_cache.sqlite database. For example, following code will take only 1-2 seconds instead 10, and will run instantly on next launch:
for i in range(10): requests.get('http://httpbin.org/delay/1')
It can be useful when you are creating some simple data scraper with constantly changing parsing logic or data format, and don’t want to redownload pages or write complex error handling and persistence.
Links
Documentation at readthedocs.org
Source code and issue tracking at GitHub.
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 Distributions
Built Distribution
File details
Details for the file requests-cache-0.1.3.zip
.
File metadata
- Download URL: requests-cache-0.1.3.zip
- Upload date:
- Size: 29.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a74d402a8f0a147b983b68046b5718f86100c84144a4d4fb96d3fdb66d43a98c |
|
MD5 | 7e3d084734ffbdf13e6c2d765384890d |
|
BLAKE2b-256 | f469bd4948eb35744a856e063f9caa1373bf18815283d7dd599f34ce104ab68e |
File details
Details for the file requests-cache-0.1.3.tar.gz
.
File metadata
- Download URL: requests-cache-0.1.3.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1331e42dafd378a8cf2618bb3dc4978a6e5e375c3666718d39c2d5336ec14622 |
|
MD5 | 504bf5589c7f09ac772e922b600122fe |
|
BLAKE2b-256 | 37e8f3fc91ec93d06ef3be4bb0cecc5fce4b0fdacd2a120fa42042b6f1cd7a2b |
File details
Details for the file requests-cache-0.1.3.win32.exe
.
File metadata
- Download URL: requests-cache-0.1.3.win32.exe
- Upload date:
- Size: 208.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6ca2ab09bb3da225c02deceb6d58ff16b2acfa54c67cb435ae6056db63a3866 |
|
MD5 | fc2a5aeb60e4ada45f70cb7b00bf7934 |
|
BLAKE2b-256 | 06f6f1c2e80aec3a216b6fcb75e85c710f4887583805a9941efce877c0f0d10c |