netprotocols 1.0.0
Complete rewrite of the library. Full details in CHANGELOG.md and the new ARCHITECTURE.md.
Highlights
- Frozen, slotted dataclasses parsed with
struct.Structreplace the ctypes core; decoded and constructed instances are identical and compare equal - Typed decode chain:
next_protocol()+ instance-accurateheader_len(IPv4 IHL and TCP data offset honored — fixes long-standing mis-slicing) - Typed error hierarchy rooted at
ProtocolError; malformed input can no longer leak arbitrary exceptions - Byte-lossless round trips, options included
- Python 3.12+, fully typed (
py.typed, mypy strict), MIT licensed, published via PyPI trusted publishing
pip install netprotocols