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.
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.
Official sources
- [1]encode/httpx — GitHub repository(2026-10-06)
- [2]HTTPX 0.28.1 — README(2026-10-06)
- [3]HTTPX 0.28.1 — pyproject.toml(2026-10-06)
- [4]HTTPX 0.28.1 release(2026-10-06)
- [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
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
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
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
Growth
Growth trends · Last 30 days
15,526 Stars
Trend data is still being collected.
Built with
Categories and tags
Categories
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
- License
- BSD-3-Clause
- Repository last updated
- Oct 2, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- aiohttp16,569 Stars
3 shared tag(s) · 1 shared category(s) · Same language
build asyncio HTTP clients, servers, and WebSockets with one Python framework
Python - Starlette12,655 Stars
3 shared tag(s) · 1 shared category(s) · Same language
build asynchronous Python web services from lightweight ASGI components
Python - gRPC45,365 Stars
3 shared tag(s) · 1 shared category(s)
define service contracts with Protocol Buffers and implement high-performance RPC over HTTP/2 across languages
C++ - ComfyUI136,119 Stars
3 shared tag(s) · Same language
save generative AI pipelines as visible graphs and rerun only what changed
Python - LiteLLM60,179 Stars
2 shared tag(s) · 2 shared category(s) · Same language
unify 100+ LLM providers behind OpenAI-compatible interfaces and centralize routing, cost controls, guardrails, and logging in an AI gateway
Python - Pydantic28,942 Stars
2 shared tag(s) · 2 shared category(s) · Same language
connect Python type hints to runtime data validation
Python
Report incorrect information
Tell us if any listing information is incorrect or outdated.