Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install requests-cache

How to install requests-cache

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install requests-cache
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1.3
0.4.3Never BuiltWhy not?
0.1.3 Available View build log
0.1.2 Available View build log
0.1.3
0.4.3Never BuiltWhy not?
0.1.3 Available View build log
0.1.2 Available View build log
Windows (64-bit)
0.1.3
0.4.3Never BuiltWhy not?
0.1.3 Available View build log
0.1.2 Available View build log
0.1.3
0.4.3Never BuiltWhy not?
0.1.3 Available View build log
0.1.2 Available View build log
Mac OS X (10.5+)
0.1.3
0.4.3Never BuiltWhy not?
0.1.3 Available View build log
0.1.2 Available View build log
0.1.3
0.4.3Never BuiltWhy not?
0.1.3 Available View build log
0.1.2 Available View build log
Linux (32-bit)
0.1.3
0.4.3Never BuiltWhy not?
0.1.3 Available View build log
0.1.2 Available View build log
0.1.3
0.4.3Never BuiltWhy not?
0.1.3 Available View build log
0.1.2 Available View build log
Linux (64-bit)
0.4.3 Available View build log
0.4.2 Available View build log
0.1.3 Available View build log
0.1.2 Available View build log
0.1.2
0.4.3Never BuiltWhy not?
0.1.3 Failed View build log
0.1.2 Available View build log
0.4.3 Available View build log
0.4.2 Available View build log
 
License
BSD License
Dependencies
Depended by
Lastest release
version 0.4.3 on Sep 20th, 2013

requests-cache

Requests-cache is a transparent persistent cache for requests (version >= 1.1.0) library.

Usage example

Just write:

import requests
import requests_cache

requests_cache.install_cache('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.

Note

requests-cache ignores all cache headers, it just caches the data for the time you specify.

History

0.4.3 (2013-09-12)
  • Fix response.from_cache not set in hooks
0.4.2 (2013-08-25)
  • Fix UnpickleableError for gzip responses
0.4.1 (2013-08-19)
  • requests_cache.enabled() context manager
  • Compatibility with Requests 1.2.3 cookies handling
0.4.0 (2013-04-25)
  • Redis backend. Thanks to @michaelbeaumont
  • Fix for changes in Requests 1.2.0 hooks dispatching
0.3.0 (2013-02-24)
  • Support for Requests 1.x.x
  • CachedSession
  • Many backward incompatible changes
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

Subscribe to package updates

Last updated Sep 20th, 2013

Download Stats

Last month:6

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.