OSS TanbouSign in with GitHub

use synchronous and asynchronous HTTP APIs with HTTP/2 in one Python client

OSS scale score 287.4OSS health 100
About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
15,526
Primary language
Python
License
BSD-3-Clause
Repository last updated
Oct 2, 2026
On this page

Overview

HTTPX is an HTTP client library for Python. It keeps a requests-like API while adding synchronous and asynchronous clients, HTTP/1.1 and HTTP/2, connection pooling, timeouts, streaming, proxies, and WSGI/ASGI transports.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Use synchronous and asynchronous requests through the same client model

HTTPX provides synchronous helpers such as httpx.get() and an AsyncClient for asyncio or Trio applications. It also covers cookies, authentication, multipart uploads, streaming downloads, proxies, and other common HTTP client behavior.

Sources: [2]

Combine HTTP/2, connection pooling, timeouts, and in-process application transports

HTTP/2 support is installed through the httpx[http2] extra, while Client and AsyncClient use keep-alive and connection pooling. WSGI and ASGI transports can issue requests directly to applications without a real network hop.

Sources: [2][3]

Best fit

Fits Python backends that want one HTTP client across external APIs and async I/O

It works well when synchronous batch jobs, asynchronous web services, and CLI code should share one HTTP client abstraction, including projects moving from requests-style APIs toward async operation or HTTP/2.

Sources: [2]

Before adoption

HTTPX 0.28.1 requires Python 3.8+; pin HTTP/2 extras and TLS behavior

HTTPX 0.28.1 requires Python 3.8 or newer and treats HTTP/2 as an optional dependency. The 0.28.1 release fixes an SSL case involving verify=False together with client certificates. Systems using custom verification, client certificates, or proxies should regression-test the exact production option set.

Sources: [3][4]

Official sources

  1. [1]encode/httpx — GitHub repository(2026-10-06)
  2. [2]HTTPX 0.28.1 — README(2026-10-06)
  3. [3]HTTPX 0.28.1 — pyproject.toml(2026-10-06)
  4. [4]HTTPX 0.28.1 release(2026-10-06)
  5. [5]HTTPX BSD-3-Clause license(2026-10-06)
Supplemental curator note

HTTPX keeps a requests-like experience while extending into async and HTTP/2, making it useful for standardizing outbound API access. For repeated requests, reuse Client or AsyncClient and make pool and timeout behavior explicit instead of repeatedly using top-level helpers.

Try it in 3 steps

  1. 1

    Install HTTPX 0.28.1

    Pin the reviewed latest stable release. HTTPX 0.28.1 requires Python 3.8 or newer.

    python -m pip install "httpx==0.28.1"
  2. 2

    Start a local verification HTTP server

    Run the Python standard-library HTTP server on localhost so the check does not require outbound network access.

    python -m http.server 8000 --bind 127.0.0.1
  3. 3

    Send a GET request with HTTPX

    From another terminal, send the request with Client and confirm a 200 response. The context manager also closes the connection pool cleanly.

    python - <<'PY' import httpx with httpx.Client(timeout=5.0) as client: response = client.get('http://127.0.0.1:8000/') print(response.status_code) PY
Check the official README

Growth

Growth trends · Last 30 days

15,526 Stars

Trend data is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • asyncio
  • http
  • python
  • trio
Stars
15,526
Forks
3,090
Watchers
155
Open issues
140
Contributors
230
Owner type
Organization
Primary language
Python
Repository last updated
Oct 2, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?