encode/httpx
Developer ToolsA full-featured Python HTTP client with sync/async APIs, HTTP/2 and a built-in CLI.
What it does
HTTPX is a Python 3 HTTP client library with sync and async APIs, HTTP/1.1 and optional HTTP/2 support, and an integrated command-line client. Its API is broadly requests-compatible, so existing requests code often needs only small changes. It also supports sending requests directly to WSGI and ASGI applications, which makes it useful in web framework tests without running a server.
Typical users are Python developers calling third-party APIs, building async services, or writing integration tests against a local app. Beyond the requests-style interface, it adds strict timeouts, full type annotations, connection pooling, proxies, multipart uploads, streaming downloads, and automatic content decoding.
Quick start
Install the library with pip:
pip install httpx
Then make a request from Python:
>>> import httpx
>>> r = httpx.get('https://www.example.org/')
>>> r.status_code
200
>>> r.text
For the command-line client, install the optional extra:
pip install 'httpx[cli]'
You can then call httpx <url> from a terminal. HTTP/2 needs the httpx[http2] extra; SOCKS proxies, brotli/zstd decoding and rich terminal output have their own extras listed in the README. See the QuickStart for the standard request flow and the API reference for the full interface.
Requirements and limits
HTTPX requires Python 3.9 or newer. HTTP/2, SOCKS proxy support and CLI features are optional dependencies, so they are unavailable unless the corresponding extras are installed. Making requests to WSGI/ASGI apps is documented in the advanced transports section. The project is BSD-3-Clause licensed. Also note that in early 2026 the maintainer closed GitHub issues and discussions, which affects where users can report bugs and find prior answers; details are discussed in the HotRepo take below.
HotRepo's take
HTTPX has 15,954 stars and 2,014 forks, and appeared at rank 8 on the Python weekly list for the week of 2026-12-04 with 110 stars gained. The more consequential recent signal is governance: in February and March 2026 the maintainer announced closing off issues and discussions, citing a "skewed gender representation" (discussion, quoted text). One commenter said the change motivated a switch to a requests-compatible Rust-backed alternative, pyreqwest (comment, compatibility wrapper), while another noted broken links on the contributing page as a side effect (comment). For readers evaluating HTTPX today, the library's documented feature set is intact, but the reduced public issue/discussion channel is a practical consideration for bug reporting and support.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.
Hacker News
You might also like
- hyperium/hyperA low-level Rust HTTP/1 and HTTP/2 library for building async clients and servers on Tokio.
- go-chi/chiA lightweight net/http-compatible Go router for building maintainable REST APIs and HTTP services of any size.
- psf/requestsA Python HTTP library for sending HTTP/1.1 requests with sessions, auth, TLS verification and streaming.
- fastapi/fastapiA Python web framework that turns type hints into validated, self-documenting REST APIs for backend developers.