/bazooka

Bazooka - reliable HTTP client

Primary LanguagePythonApache License 2.0Apache-2.0

Bazooka - reliable HTTP client

https://travis-ci.org/phantomii/bazooka.svg?branch=master

Features:

  • retries out of box
  • full-compatible interface with requests
  • by default client raises exception if status code isn't 2xx
  • curl-like logging out of box
  • correlation-id support

Example

>>  from bazooka import client
>>
>>  c = client.Client()
>>
>>  print c.get('http://eis/').json()

or

>>  import bazooka
>>
>>  c = bazooka.Client(...)

Duration logging is enabled by default for client. You can use log_duration flag to enable duration logging

>>  c = client.Client(log_duration=False)

or

>>  c.log_duration = False

TODO

  • timeouts support