Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.0.0] - 2025-01-XX¶
Initial release of pyheaderparse.
Added¶
Core Features
HeaderParserclass for parsing HTTP headersCookieParserclass for parsing cookiesHeaderValuedataclass for parameterized headersFull kwargs support for creating and modifying headers/cookies
Automatic underscore-to-hyphen conversion in kwargs
Method chaining support for fluent API
Case-insensitive header access
Header Parsing
Parse raw header strings and bytes
Parse Content-Type with parameters
Parse Accept headers with quality values
Parse Accept-Language with quality values
Parse Accept-Encoding as list
Parse Cache-Control as dictionary
Parse boolean headers (DNT, Sec-GPC)
Parse Client Hints (Sec-CH-UA-*)
Parse Sec-Fetch metadata headers
Parse Priority header
Automatic Content-Length to integer conversion
Cookie Features
Parse multiple cookie lines
Parse single-line semicolon-separated cookies
to_cookie_header()- export as Cookie header stringto_dict()- export as dictionaryFull CRUD operations (set, get, remove, clear)
Export Methods
to_dict()- export headers as dictionaryto_dict(stringify=True)- export with string valuesto_raw()- export as raw header formatto_requests_headers()- export for requests library
Factory Methods
from_dict()- create from dictionaryfrom_kwargs()- create from kwargsfrom_requests_response()- create from requests Response
Utility Methods
is_cors()- check if CORS requestis_ajax()- check if AJAX requestget_client_hints()- get all Sec-CH-* headersget_sec_fetch_metadata()- get Sec-Fetch-* headers
CLI
pyheaderparse parse- parse headerspyheaderparse cookies- parse cookiespyheaderparse info- show header metadataMultiple output formats (JSON, raw, repr)
File and stdin input support
Documentation
Comprehensive README
Full Sphinx documentation
API reference
Usage guides
CLI documentation
Testing
Comprehensive test suite
pytest integration
Coverage reporting
[Unreleased]¶
Planned¶
Support for Set-Cookie parsing
HTTP/2 pseudo-headers support
Header validation
Custom parser plugins
Async support