Skip to main content

Persistent cache for requests library

Project description

requests-cache

Requests-cache is a transparent persistent cache for requests (version <= 0.14.2) 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.

History

0.2.1 (2013-01-13)

  • Fix broken PyPi package

0.2.0 (2013-01-12)

  • Last backward compatible version for Requests 0.14.2

0.1.3 (2012-05-04)

  • Thread safety for default sqlite backend

  • Take into account the POST parameters when cache is configured with ‘POST’ in allowable_methods

0.1.2 (2012-05-02)

  • Reduce number of sqlite database write operations

  • fast_save option for sqlite backend

0.1.1 (2012-04-11)

  • Fix: restore responses from response.history

  • Internal refactoring (MemoryCache -> BaseCache, reduce_response and restore_response moved to BaseCache)

  • connection option for MongoCache

0.1.0 (2012-04-10)

  • initial PyPI release

Project details


Download files

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

Source Distributions

requests-cache-0.2.1.zip (31.5 kB view details)

Uploaded Source

requests-cache-0.2.1.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

requests-cache-0.2.1.win32.exe (210.1 kB view details)

Uploaded Source

File details

Details for the file requests-cache-0.2.1.zip.

File metadata

  • Download URL: requests-cache-0.2.1.zip
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for requests-cache-0.2.1.zip
Algorithm Hash digest
SHA256 9a57b6cf43437de860dc46ec6ed3c8cefb05d2be1540f4a0f03c1a1af79bf9b8
MD5 c667c15f17008f6eb2b2e0adb08962f5
BLAKE2b-256 b63ec7c7f7f4a787d392f6ecd375b4075b9f6cc56add4eb91708f80ed86ede7e

See more details on using hashes here.

File details

Details for the file requests-cache-0.2.1.tar.gz.

File metadata

File hashes

Hashes for requests-cache-0.2.1.tar.gz
Algorithm Hash digest
SHA256 fcb483ea4db5df85d9f2ef10a1de7dec9a1d05b479f5cc1649766eb68b18c89f
MD5 05ef97bb0b428598809d8909e80e3ed2
BLAKE2b-256 d9dcafa94bc6673e5d650e745add020d365e3a25d8ffdf902ed8d9ae756df388

See more details on using hashes here.

File details

Details for the file requests-cache-0.2.1.win32.exe.

File metadata

File hashes

Hashes for requests-cache-0.2.1.win32.exe
Algorithm Hash digest
SHA256 64102c926027c5d2f70ae8fdd6f66bdfa7bc455efefcd54e10722c75fa642293
MD5 c8bedcbaa305d6bdda85ce79805eb5a3
BLAKE2b-256 6bed42fc8740aad77e176e7103010d3b4c39cfe97adede01fd2d952835ce9b71

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