Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dogbutler

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dogbutler

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

  • 0.0.4
  • PyPI
  • Socket score

Maintainers
2

==================== READ ME

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

==================== INSTALLATION

pip install dogbutler

==================== USAGE

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

import dogbutler r = dogbutler.get('http://www.google.com', headers={'a': 'antelope'}, cookies={'a': 'apple'}) r.status_code 200 r.content

Sessions

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

from dogbutler import Session s = Session() r = s.get('http://www.google.com', headers={'a': 'antelope'}, cookies={'a': 'apple'}) r.status_code 200 r.content

Async

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 = ('http://www.google.com', {'headers': {'a': 'antelope'}, 'cookies': {'a': 'apple'}}) request2 = ('http://www.apple.com', {'headers': {'b': 'bear'}, 'cookies': {'b': 'banana'}}) response1, response2 = async.get([request1, request2]) response1.status_code 200 response2.status_code 200

==================== CHANGE LOG

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc