--- id: pmd-net-proto version: "0.0.3" license: GPL-3.0-or-later license_treatment: copyleft maintenance: active --- # pmd-net-proto — The network-protocol packet parse/assemble layer of the PyTCP stack — Ethernet through TCP/UDP — fully usable on its own. License: copyleft · Maintenance: active · Downloads: 100.8K/mo ## What it is and what it does pmd-net-proto is a network protocol codec library providing parser and assembler pairs for common Internet protocols—Ethernet, ARP, IPv4, IPv6, ICMPv4, ICMPv6, IGMP, TCP, UDP, DHCPv4, and DHCPv6—each with full RFC adherence, integrity and sanity validation, and typed wire enums. Every protocol follows a consistent six-file pattern: frozen header dataclass, base composition layer, three-phase RX parser pipeline, keyword-only TX assembler, and a two-axis error tree (IntegrityError for structural/wire-shape issues, SanityError for logical invariants). The library is designed for strict, wire-hostile input handling: validation errors are typed exceptions that survive Python's -O optimization flag (unlike asserts), so they defend against malformed network data. Unknown wire codepoints are materialized as identity-stable pseudo-members via stdlib enum hooks, with no third-party enum library needed. It ships with py.typed and is strict-mypy clean, making it suitable for type-safe network protocol work in applications that need RFC-compliant, deterministic packet handling. Use it for: - Build network packet inspection tools that parse raw wire frames and validate against RFC specifications. - Construct protocol-compliant packets (TCP, UDP, DHCP, etc.) for network testing or packet generation. - Implement custom network stacks or protocol handlers that require strict validation and typed protocol enums. - Debug network issues by parsing captured packets with detailed integrity and sanity error reporting. - Develop network security tools that need to detect malformed or hostile wire input. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses, assembles, and validates network protocol packets (Ethernet through TCP/UDP) with RFC-grounded wire-format codecs and strict type safety. Yes, if you need RFC-grounded network protocol parsing and assembly with strict validation. The package is actively maintained, has no known vulnerabilities, low install friction, and comprehensive protocol coverage. The GPL-3.0-or-later license is a blocker only for proprietary closed-source work. Verify the Python version requirement before committing to production. ## Install pip install pmd-net-proto uv add pmd-net-proto poetry add pmd-net-proto ## Installing pmd-net-proto Before you install: Low friction: pure Python wheel with only two runtime dependencies (pmd-net-addr and typing_extensions). Actively maintained with a recent release (23 days old) and no known vulnerabilities. License in practice: GPL-3.0-or-later copyleft license requires derivative works and distributions to be licensed under GPL-3.0 or later; suitable for open-source projects but not for proprietary closed-source applications. Quickstart: pip install pmd-net-proto from pmd_net_proto.protocols.udp.udp__parser import UdpParser from pmd_net_proto.protocols.udp.udp__assembler import UdpAssembler datagram = UdpAssembler(udp__sport=12345, udp__dport=53, udp__payload=b"query") parsed = UdpParser(packet_rx) # raises UdpIntegrityError / UdpSanityError on bad input Requires Python >=3.9; description mentions 3.14+ for PEP 695 generics—verify your Python version against the actual requirement. Verify before relying: - Whether the description's Python 3.14+ requirement aligns with the metadata's requires_python >=3.9. - Actual test coverage percentage beyond the stated ~99% source coverage claim. - Whether the ~260 source modules and 5770 unit tests figures remain current for version 0.0.3. ## Package facts - License: GPL-3.0-or-later (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 100.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags network packet parsing, TCP/IP protocol codec, wire format assembly, packet validation, RFC-compliant protocol handling, IPv4 IPv6 parsing, UDP TCP packet builder, packet-parsing, protocol-codec, rfc-compliant [View on SkillFed](https://skillfed.io/packages/pmd-net-proto) · [View on PyPI](https://pypi.org/project/pmd-net-proto/)