Skip to main content

Bazooka - reliable HTTP client

tests workflow

Overview

Bazooka is a reliable and efficient HTTP client for Python that provides features such as retries out of the box, full compatibility with the requests library, and customizable logging options.

Key Features

  • retries: Bazooka includes built-in retry logic to handle temporary network failures or 5XX server errors.
  • full compatibility: Bazooka is designed to work seamlessly with the requests library, allowing for easy integration into existing projects.
  • explicit automatic error handling: by default client raises exception if status code isn't 2xx.
  • curl-like customizable Logging: Bazooka offers flexible logging options, including duration logging and sensitive logging support.

Example Usage

Basic Example

import bazooka

client = bazooka.Client()
print(client.get('http://example.com').json())

Using Correlation IDs

(Usable to match bazooka requests with your business logic logs)

from bazooka import correlation

client = bazooka.Client(correlation_id='my_correlation_id')
print(client.get('http://example.com').json())

Raised Exceptions on 4xx Errors

import bazooka
from bazooka import exceptions

client = bazooka.Client()

try:
    response = client.get('http://example.com', timeout=10)
except exceptions.NotFoundError:
    # process 404 error
    pass
except exceptions.ConflictError:
   # process 409 error
    pass
except exceptions.BaseHTTPException as e:
   # process other HTTP errors
    if e.code in range(400, 500):
        print(f"4xx Error: {e}")
    else:
        raise

Getting Started

To get started with Bazooka, install it via pip:

pip install bazooka

Metadata

Release files for bazooka 1.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bazooka 1.3.4
File Size Uploaded Provenance Actions
bazooka-1.3.4.tar.gz 99.5 kB With provenance Details for bazooka-1.3.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bazooka 1.3.4
File Interpreter ABI Platform Actions
bazooka-1.3.4-py3-none-any.whl Python 3 none any Details for bazooka-1.3.4-py3-none-any.whl

Total release size: 126.8 kB

Release files / bazooka-1.3.4.tar.gz

Download URL bazooka-1.3.4.tar.gz
Size 99.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8c18087cfb74ee77f8e6cea1133f8fc46870b5d30f4b0142066b034d06a2efb0
BLAKE2b-256 checksum
How to use checksums
316f29b8a29f11b36686f796b6dcdb555499604dd9544c8581a93095d55345ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.

Transparency log

Release files / bazooka-1.3.4-py3-none-any.whl

Download URL bazooka-1.3.4-py3-none-any.whl
Size 27.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a3a11bcb32519a9d5728d6e24dd1afd0408ef5e6836c6a7aa95c06e4f73429e
BLAKE2b-256 checksum
How to use checksums
76b3ad4fd408f94d0faa2cd78b307bfc71790672edf1c5b511525afb748386f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.

Transparency log

Security for bazooka 1.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bazooka-1.3.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page