Find your next open-source project

Search by name, purpose, or keyword, or paste a GitHub URL. Start with / to search agent skills (e.g. /pdf)

encode/httpx

Developer Tools

A full-featured Python HTTP client with sync/async APIs, HTTP/2 and a built-in CLI.

15,954
2,014
Python
BSD-3-Clause
7 years old

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

Httpx closing down issues and discussions due to "skewed gender representation"
▲ 10 · 14 comments · February 28, 2026
httpx: Next generation HTTP client for Python
▲ 4 · 0 comments · October 2, 2020
Encode/httpx: Closing off access
▲ 3 · 1 comment · March 11, 2026

You might also like

  1. hyperium/hyperA low-level Rust HTTP/1 and HTTP/2 library for building async clients and servers on Tokio.Rust16,535
  2. go-chi/chiA lightweight net/http-compatible Go router for building maintainable REST APIs and HTTP services of any size.Go23,269
  3. psf/requestsA Python HTTP library for sending HTTP/1.1 requests with sessions, auth, TLS verification and streaming.Python54,638
  4. fastapi/fastapiA Python web framework that turns type hints into validated, self-documenting REST APIs for backend developers.Python104,076