http-fields documentation

http-fields represents HTTP headers as immutable Python dataclasses. abnf grammars drive both directions: parsing incoming header strings and validating field values, so a constructed header is always well-formed.

Requires Python 3.10+.

Documentation

The docs follow the Diátaxis model:

Install

uv add http-fields
# or: pip install http-fields