Skip to main content

Resilience-first async HTTP client framework for Python

Project description

httpware

Test PyPI version Python versions License: MIT

Async HTTP client framework for Python.

httpware is a thin opinionated wrapper around httpx2. It re-exports httpx2.Request/httpx2.Response, adds a middleware chain composed at client construction, supports opt-in typed response decoding (pydantic and msgspec are both extras), and raises a status-keyed exception tree automatically on 4xx/5xx.

Status: Pre-1.0 (0.3.0). Public API is subject to change between minor releases until v1.0. Resilience middleware (retry / timeout / bulkhead), streaming, and observability are not yet shipped.

Install

pip install httpware                # core only — no decoder
pip install httpware[pydantic]      # + PydanticDecoder (the default-decoder path)
pip install httpware[msgspec]       # + MsgspecDecoder
pip install httpware[all]           # everything declared above (pydantic, msgspec, otel)

AsyncClient() with no decoder= argument defaults to constructing a PydanticDecoder; that path requires the pydantic extra and raises ImportError at AsyncClient.__init__ if it is missing. The otel extra is declared but the OpenTelemetry middleware (Epic 5) has not shipped yet.

Quickstart

Requires: pip install httpware[pydantic]

from httpware import AsyncClient
from pydantic import BaseModel


class User(BaseModel):
    id: int
    name: str


async def main() -> None:
    async with AsyncClient(base_url="https://api.example.com") as client:
        user = await client.get("/users/1", response_model=User)
        print(user.name)

📚 Documentation

📦 PyPI

📝 License

Part of modern-python

Browse the full list of templates and libraries in modern-python — see the org profile for the categorized index.

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

httpware-0.3.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

httpware-0.3.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file httpware-0.3.0.tar.gz.

File metadata

  • Download URL: httpware-0.3.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for httpware-0.3.0.tar.gz
Algorithm Hash digest
SHA256 225fda6e2a30197e0b5629c6f423c3536d0b3b2cf22c6723cde684ca4e2b70dd
MD5 c068ff6849fd98d992bdd85d0baefdbf
BLAKE2b-256 63bfca72bde3ac00aa99dbc279b716fb06afb1dd2d41cef1c78d4f7e4c6ec198

See more details on using hashes here.

File details

Details for the file httpware-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: httpware-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for httpware-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6ce25e93ad6c1a41132f3184a7d55b08c330a1116b94e27d5eb1203ea68705b
MD5 e6dd7ea95c30aeff79f81a36ee3f46bf
BLAKE2b-256 c9e4f5864755e2a2a92abd963b4655bd45a03879789b2cd40aa518a6f2d6c221

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page