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:
Tutorials — start here if you’re new. A hands-on walk through installing, parsing, building, and serializing headers.
How-to guides — task-focused recipes:
Reference — precise technical description:
Header catalog — every header, grouped by spec, with its constructors.
Explanation — the why: the frozen-dataclass model, the construction contract, and where validation lives.
Install¶
uv add http-fields
# or: pip install http-fields