Jun 13Vibe with Hermes Agent — Bengaluru · RSVP
ToolsMCPBlogResearchCommunityStar on GitHub
All Tools
H
Dev ToolsFreeOpen Source

HTTPX

Modern Python HTTP client with async and HTTP/2 support

BSD-3-Clause

ABOUT

Calling REST APIs and LLM inference endpoints from Python requires an HTTP client that handles connection pooling, retries, timeouts, and streaming efficiently. The standard urllib is low-level and verbose, while requests is synchronous-only and lacks HTTP/2. HTTPX provides a familiar requests-style API with native async/await, HTTP/2 multiplexing, connection keep-alive, and rich timeout/retry configuration. Code written with HTTPX works identically in sync and async contexts, and its h11/h2 stack gives fine-grained control over the HTTP protocol without sacrificing convenience.

INSTALL
pip install httpx

INTEGRATION GUIDE

1. Call LLM provider APIs (OpenAI, Anthropic, Together) with async streaming, connection pooling, and automatic retry for production inference 2. Build async web scrapers and data ingestion pipelines that multiplex hundreds of concurrent HTTP requests over HTTP/2 connections 3. Replace requests in existing codebases for a drop-in upgrade to HTTP/2 and async support with minimal API changes 4. Implement API client wrappers with automatic JSON serialization, auth headers, and custom transport layers for mock testing 5. Stream server-sent events (SSE) from real-time AI inference endpoints with on-the-fly decoding and backpressure handling

TAGS

pythonhttp-clientasynchttp2api-clientnetworkingdeveloper-tools