Skip to main content

Requests wrapper that add's support for HTTP caching. It act's just like requests but with a few extra parameters and features.

Project description

Urlquick II: Requests, but with caching

PyPI Documentation Status Build Status Coverage Status Maintainability

Urlquick II

Urlquick2 is a wrapper for requests that add's support for http caching. It act's just like requests but with a few extra parameters and features. 'Requests' itself is left untouched.

All GET, HEAD and POST requests are cached locally for a period of 4 hours, this can be changed. When the cache expires, conditional headers are added to any new request e.g. "Etag" and "Last-modified". Then if the server returns a 304 Not-Modified response, the cache is used, saving having to re-download the content body.

Usage

>>> from urlquick import Session

# Make a connection pool.
>>> http = Session()

# Make a request.
>>> r = http.get('https://httpbin.org/ip')

# View response data.
>>> r.json()
{'ip': '172.69.48.124'}

Install

Stable

$ pip install urlquick

Unstable

$ pip install git+https://github.com/willforde/urlquick.git

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

urlquick-2.0.0.tar.gz (12.7 kB view hashes)

Uploaded Source

Built Distribution

urlquick-2.0.0-py2.py3-none-any.whl (9.4 kB view hashes)

Uploaded Python 2 Python 3

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