HTTPX

A modern HTTP client for Python with sync and async APIs and HTTP/2, now in low-level maintenance, with Pydantic’s httpx2 continuing it

Visit HTTPX →
Tools & Libraries

HTTPX supports both sync and async clients with the same familiar, Requests-like API — httpx.get(...) works the same way you’d expect, but async with httpx.AsyncClient() is also available when you need it, plus HTTP/2 support Requests doesn’t have.

That dual sync/async support is the main reason to reach for it over Requests specifically: you get one library that works in both a plain script and an async codebase like a FastAPI app, rather than switching HTTP libraries depending on context.

Maintenance note: HTTPX 0.29.0 was released on 26 November 2026, its first release since December 2024, and requires Python 3.10 or later. The project’s contributing guide says it is entering low-level maintenance with no further feature development, and that the maintainers are focusing on a successor called hip. Pydantic separately publishes a continuation, httpx2 (imported as httpx2), with the same API and defaults in the checks on httpx vs requests; new projects that want this style of client should look there first. Existing code on httpx keeps working.

See Python Web Scraping Tools Compared for using it to fetch pages ahead of parsing with Beautiful Soup.