httpx
Engineered for simplicity, httpx provides a complete Python web suite…
- Supports both client and server functionality.
- Presents a clear, simple, and tightly constrained API.
- A minimal, easily readable implementation.
...we're currently in early stages design, and would love for you to get involved.
Installation
Install the package from PyPI…
$ uv add httpx --pre
Client
Sending HTTP requests…
>>> import httpx
>>> cli = httpx.Client()
>>> r = cli.get('https://www.example.com/')
>>> r
<Response [200 OK]>
Server
Creating web apps…
>>> import httpx
>>> def app(request):
... content = httpx.HTML('<html><body>Β‘Hola, mundo!</body></html>')
... return httpx.Response(200, content=content)
>>> s = httpx.Server(app)
>>> s.serve()
Motivation
A clean modern design, with a focused API and an exceptionally light installation footprint.
For comparison, see httpx vs requests…
$ uv add httpx
$ uv tree --show-sizes --package httpx
httpx v1.0.dev5 (33.5KiB)
βββ truststore v0.10.0 (17.8KiB)
$ uv add requests
$ uv tree --show-sizes --package requests
requests v2.33.1 (63.4KiB)
βββ certifi v2026.2.25 (150.1KiB)
βββ charset-normalizer v3.4.7 (302.4KiB)
βββ idna v3.11 (69.3KiB)
βββ urllib3 v2.6.3 (128.5KiB)
Contribution
The httpx redesign is currently in early development.
We are currently seeking sponsorship, and looking to expand our team.
If you'd like to discuss getting involved, please book in some time.
MIT Licensed.
Designed & Built with Love.
— π —