hx

hx

An HTTP toolkit for folks who give a damn.


Engineered for simplicity, hx provides a complete Python web suite…

Installation

Install the package from PyPI…

$ uv add hx

Client

Sending HTTP requests…

>>> import hx

>>> cli = hx.Client()
>>> r = cli.get('https://www.example.com/')
>>> r
<Response [200 OK]>

Server

Creating web apps…

>>> import hx

>>> def app(request):
...     content = hx.HTML('<html><body>Β‘Hola, mundo!</body></html>')
...     return hx.Response(200, content=content)

>>> s = hx.Server(app)
>>> s.serve()

Motivation

A clean modern design, with a focused API and an exceptionally light installation footprint.

For comparison, see hx vs requests

$ uv add hx
$ uv tree --show-sizes --package hx
hx v1.0.0 (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

We have a transparent development model, and welcome feedback.

Pull requests are restricted to team members only.


MIT Licensed.
Designed & Built with Love.

— πŸ’– —