Analysis updated 2026-06-24
Make async HTTP calls from a FastAPI or Starlette service
Test a FastAPI app in process by passing the ASGI app to httpx
Replace requests with httpx to add HTTP/2 and async support
Stream a large file download in chunks without holding it all in memory
| encode/httpx | facebookresearch/detr | pre-commit/pre-commit | |
|---|---|---|---|
| Stars | 15,264 | 15,266 | 15,267 |
| Language | Python | Python | Python |
| Setup difficulty | easy | hard | easy |
| Complexity | 2/5 | 4/5 | 2/5 |
| Audience | developer | researcher | developer |
Figures from each repo's GitHub metadata at analysis time.
HTTP/2 needs the optional h2 extra installed via pip install httpx[http2].
HTTPX is a Python library for making HTTP requests, meaning it lets your code talk to websites and web services by sending requests and receiving responses. It is written in Python and designed to work with Python 3.9 and later versions. What sets HTTPX apart from older tools is that it supports both synchronous and asynchronous usage. Synchronous means your code waits for each request to finish before moving on, which is the traditional approach. Asynchronous (using asyncio or trio) means your code can send many requests at the same time without waiting, which is useful when building faster apps. HTTPX also supports HTTP/2, a newer version of the web protocol that can handle multiple requests over a single connection more efficiently than HTTP/1.1. HTTPX includes a built-in command-line client, so you can send web requests directly from your terminal without writing any code, useful for quick testing. The library handles many common tasks automatically: it verifies SSL certificates for secure connections, manages cookies, supports authentication, handles automatic decompression of responses, and can send large files in chunks via streaming downloads. It can also make requests directly to WSGI and ASGI applications, which are Python web application formats, handy for testing your own web app without needing a live server. HTTPX enforces strict timeouts on all requests to prevent your program from hanging indefinitely. The project is BSD licensed.
Python HTTP client that supports both sync and async usage, HTTP/2, strict timeouts, and direct calls into WSGI and ASGI apps. Familiar requests-style API.
Mainly Python. The stack also includes Python, asyncio, trio.
BSD license, free to use commercially with attribution.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.