Skip to main content

Simple urllib2 caching handler

Project description

This is a simple caching handler for urllib2.

Usage

Either use the build_opener function which takes the path to the cache folder and returns an OpenerDirector instance. You can then use it’s open method to open urls normally. If the file was already downloaded, then it will be taken from the cache.

You can also use the CachedHandler wherever it’s useful within urllib2. This also takes the path to cache folder as an argument of the constructor.

Be aware that the caching is very simple. It detects incomplete downloads but doesn’t take any caching headers into account. To invalidate the cache you have to delete the files in the cache folder.

Changelog

1.0.1 - 2008-07-23

  • Fixed packaging. [fschulze]

1.0 - 2008-07-22

  • Initial release. [fschulze]

Project details


Download files

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

Source Distribution

urllibcache-1.0.1.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file urllibcache-1.0.1.tar.gz.

File metadata

  • Download URL: urllibcache-1.0.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for urllibcache-1.0.1.tar.gz
Algorithm Hash digest
SHA256 23979936958b5c0e4c312c0ad720c39db027dde042c1e29b96c104c9ee8ded5d
MD5 6d40cfa0ecc6347775c8864a8ea7a4d1
BLAKE2b-256 02666b663ef01bc5b7d582b249deef8a0e08588db1d912b62ba1889017d11778

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