Skip to main content

Make HTTP/HTTPS requests with cache, cookie, and redirect support

Project description


Dogbutler is a client library base on requests but with a cache and persistent cookie support.


>>> pip install dogbutler


DogButler supports GET, HEAD, POST, PATCH, PUT, DELETE, and OPTIONS requests.

>>> import dogbutler
>>> r = dogbutler.get('', headers={'a': 'antelope'}, cookies={'a': 'apple'})
>>> r.status_code
>>> r.content


A session has its own cache, cookie jar, and redirect history.

>>> from dogbutler import Session
>>> s = Session()
>>> r = s.get('', headers={'a': 'antelope'}, cookies={'a': 'apple'})
>>> r.status_code
>>> r.content


Note: Only GET requests can be called asynchronously at the moment.

Each request is a tuple of (url, kwargs), where kwargs can contain optional arguments such as headers and cookies.

>>> from dogbutler import async
>>> request1 = ('', {'headers': {'a': 'antelope'}, 'cookies': {'a': 'apple'}})
>>> request2 = ('', {'headers': {'b': 'bear'}, 'cookies': {'b': 'banana'}})
>>> response1, response2 = async.get([request1, request2])
>>> response1.status_code
>>> response2.status_code


Version 0.0.4

  • Ignore cache if no-cache is defined in request header.

  • Fix minor bugs.

Version 0.0.3

  • Support Sessions.

  • Not cache hop-by-hop headers.

Version 0.0.2

  • Set default cache, cookie cache, and redirect cache backends.

  • Disable cache, cookie cache, and redirect cache by setting each to None.

Version 0.0.1

  • Initial 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 Distribution

dogbutler-0.0.4.tar.gz (19.3 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page