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 request_cache request_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.1.zip
.
File metadata
- Download URL: requests-cache-0.1.1.zip
- Upload date:
- Size: 27.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db65288784d3fc9ec649e525902ad64d0aae920dc5157f47115918290372705 |
|
MD5 | 4100f7d6f569a4125270267e45afc6ab |
|
BLAKE2b-256 | 251002e8f7f2a1a08cbb6cfbeb3ce76a1440c8e53d8412d8e154db3c177dc25b |
File details
Details for the file requests-cache-0.1.1.tar.gz
.
File metadata
- Download URL: requests-cache-0.1.1.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 966444f231965251a3da01a19d6400f0349d7b806bac2ab1052ee74c7649a314 |
|
MD5 | 35b0017b5562a6380b3521adf3760325 |
|
BLAKE2b-256 | fe1b1df8b406cedfcbd6496f46e56847bc455070c0cbf257992462bc4d6ba8e8 |
File details
Details for the file requests-cache-0.1.1.win32.exe
.
File metadata
- Download URL: requests-cache-0.1.1.win32.exe
- Upload date:
- Size: 208.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c960d412ca12b40f727584516803cd846d334e73e9ee1280da97d1bf150a036 |
|
MD5 | c3e7db7097aaa8864f0160f6cab3dec2 |
|
BLAKE2b-256 | 4fdd3899a68d898860304572904ae77ee69d48511c02f48918266d44a8441735 |