$npx skillfedfor your agent

pmd-pytcp

Pure-Python, zero-dependency TCP/IP stack — Ethernet through RFC 9293 TCP — running in user space on a TAP/TUN interface, embeddable in-process or run as a daemon, with a Berkeley-sockets API.

With conditionsPyPI NetworkingReleased Aug 2026108.1K downloads / moGPL-3.0-or-laterPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pmd_pytcp-0.3.7-py3-none-any.whl
v0.3.7 · released 2026-08-13 · Python >=3.9 · 3 runtime deps: pmd-net-addr, pmd-net-proto, typing_extensions

Yes, with conditions. Install if you need a pure-Python, controllable TCP/IP stack for testing, simulation, or custom protocol work and can accept GPL-3.0-or-later licensing. The low install friction, active maintenance, and zero external dependencies (only internal PyTCP modules) make it straightforward to add. However, it is Alpha-status software; expect API changes and verify performance and stability for your use case before relying on it in production. Requires Linux and root/CAP_NET_ADMIN for interface setup.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires root or CAP_NET_ADMIN to create and configure TAP/TUN interfaces.
  • Python >=3.9 required.
  • Linux only (POSIX::Linux classifier).

License · maintenance · safety

GPL-3.0-or-later (copyleft) — GPL-3.0-or-later (copyleft): any code that links this library must be distributed under a compatible open-source license. Proprietary or closed-source projects cannot use it without a separate commercial license.

last release 2026-08-13 (1 days) · last repo commit 2026-08-10 · 376 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 108,065 downloads/mo, #12,580 on PyPI

Verify before relying

# In-process stack
from pmd_pytcp import socket, stack

stack.init()
stack.start()
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("10.0.1.1", 7))
sock.send(b"hello")
data = sock.recv(5)
sock.close()
stack.stop()

# Or daemon mode (separate process):
# Terminal 1: python -m pmd_pytcp.daemon --ipc-socket /tmp/pmd_pytcp.sock
# Terminal 2:
from pmd_pytcp.client import connect
from pmd_pytcp.socket import AddressFamily, SocketType
with connect(socket_path="/tmp/pmd_pytcp.sock") as client:
    sock = client.socket(AddressFamily.INET4, SocketType.STREAM)
    sock.connect(("10.0.1.1", 7))
  • Performance characteristics (throughput, latency) compared to kernel stack or other implementations.
  • Stability and production readiness beyond Alpha status; known limitations or edge cases in RFC compliance.
  • Multicast and IPv6 feature completeness (MLDv2/IGMP mentioned but not fully detailed).
  • Scalability limits (number of concurrent sockets, interfaces, or packet throughput).
Same gist for agents: .md · .json

What it is and what it does

PyTCP is a complete TCP/IP stack written entirely in Python that runs in user space on TAP/TUN interfaces instead of relying on the kernel. It implements Ethernet II, ARP, IPv4/IPv6 with extension headers, ICMPv4/ICMPv6 (including multicast group membership), DHCPv4/DHCPv6, UDP, and a full RFC 9293 TCP with congestion control (Reno, NewReno, CUBIC), selective acknowledgment, and window scaling. The stack exposes a Berkeley-sockets API that mirrors the standard library socket module, so existing socket code can often run with minimal changes.

You can embed PyTCP directly in your Python process (calling stack.init(), stack.start(), then creating sockets) or run it as a daemon in a separate process and connect to it via an AF_UNIX control socket from client processes. The daemon model lets multiple processes share a single stack instance without each one needing to own the TAP/TUN interface. The implementation is fully typed, thread-safe for multi-interface setups, and designed to match Linux kernel behavior where RFCs are ambiguous. It ships with three independently published distributions: pmd-net-addr (address types), pmd-net-proto (packet parsing), and pmd-pytcp (the running stack).

Use it for

  • Embedded network simulation or testing: run a full TCP/IP stack in a test harness without kernel privileges or system configuration.
  • Custom protocol development: build and test new transport or application protocols on top of a controllable, inspectable stack.
  • Network emulation or sandbox environments: isolate application network behavior in user space for security or reproducibility.
  • Educational or reference implementation: study RFC-compliant TCP/IP behavior with readable, auditable Python source code.
  • Daemon-based multi-process networking: share a single stack instance across multiple client processes via IPC.
  • TAP/TUN-based VPN or overlay networking: implement custom network overlays or tunneling without kernel module development.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, with conditions.

Install if you need a pure-Python, controllable TCP/IP stack for testing, simulation, or custom protocol work and can accept GPL-3.0-or-later licensing. The low install friction, active maintenance, and zero external dependencies (only internal PyTCP modules) make it straightforward to add. However, it is Alpha-status software; expect API changes and verify performance and stability for your use case before relying on it in production. Requires Linux and root/CAP_NET_ADMIN for interface setup.

Install

pmd-pytcp on PyPI

Before you install

Low friction: three runtime dependencies (pmd-net-addr, pmd-net-proto, typing_extensions), all published by the same project. Active maintenance with a commit on 2026-08-10 and 376 repository stars. Alpha status (Development Status :: 3) means the API may still shift.

Requires root or CAP_NET_ADMIN to create and configure TAP/TUN interfaces. Python >=3.9 required. Linux only (POSIX::Linux classifier).

License in practice

GPL-3.0-or-later (copyleft): any code that links this library must be distributed under a compatible open-source license. Proprietary or closed-source projects cannot use it without a separate commercial license.

Quickstart

# In-process stack
from pmd_pytcp import socket, stack

stack.init()
stack.start()
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("10.0.1.1", 7))
sock.send(b"hello")
data = sock.recv(5)
sock.close()
stack.stop()

# Or daemon mode (separate process):
# Terminal 1: python -m pmd_pytcp.daemon --ipc-socket /tmp/pmd_pytcp.sock
# Terminal 2:
from pmd_pytcp.client import connect
from pmd_pytcp.socket import AddressFamily, SocketType
with connect(socket_path="/tmp/pmd_pytcp.sock") as client:
    sock = client.socket(AddressFamily.INET4, SocketType.STREAM)
    sock.connect(("10.0.1.1", 7))

Verify before relying

  • Performance characteristics (throughput, latency) compared to kernel stack or other implementations.
  • Stability and production readiness beyond Alpha status; known limitations or edge cases in RFC compliance.
  • Multicast and IPv6 feature completeness (MLDv2/IGMP mentioned but not fully detailed).
  • Scalability limits (number of concurrent sockets, interfaces, or packet throughput).

Package facts

LicenseGPL-3.0-or-later copyleft
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
pmd-net-addrpmd-net-prototyping_extensions
MaintenanceActively maintained 1 days since the last release
Last repo commit
First released
Downloads108,065 / month, #12,580 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaEnvironment :: ConsoleNatural Language :: EnglishOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.14Topic :: System :: NetworkingTyping :: Typed

Evidence: pmd_pytcp-0.3.7-py3-none-any.whl

Tags

Capabilities
TCP/IP stack Pythonuser space networkingTAP TUN interfaceBerkeley sockets APIpure Python network stackRFC 9293 TCP implementationin-process socket library
Topics
networking-stackuser-space-iotesting-simulation
PyPI keywords
pmd_pytcpstacknetworkingtcpipipv4ipv6arpetherneticmp

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “TCP/IP stack Python”

  • pmd-pytcpA pure-Python TCP/IP stack (Ethernet through RFC 9293 TCP) that runs…
  • pydivertPyDivert is a Python binding for the WinDivert Windows driver that…
  • dpktdpkt parses and creates TCP/IP protocol packets with minimal…

Give your agent the search over MCP, or paste the wish link into any chat.

More Networking packages

h11 With conditions
PyPI · WWW/HTTP · released Apr 2025

h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.

MITpure Python · 3.8+aging
894.9Mdownloads / mo
psutil Worth it
PyPI · Libraries · released Jan 2026

psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.

permissive licensecompiled wheel · 3.6+
387.6Mdownloads / mo
pyOpenSSL With conditions
PyPI · Python Modules · released Aug 2026

pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.

Apache-2.0pure Python · 3.9+
294.2Mdownloads / mo
uvloop With conditions
PyPI · Networking · released Oct 2025

uvloop is a drop-in replacement for Python's built-in asyncio event loop, implemented in Cython and using libuv, that accelerates async I/O operations.

Apache-2.0compiled wheel · 3.8.1+
257.9Mdownloads / mo
execnet With conditions
PyPI · Libraries · released Nov 2025

execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.

However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…

MITpure Python · 3.8+aging
172.1Mdownloads / mo
pyzmq Worth it
PyPI · Networking · released Sep 2025

PyZMQ provides Python bindings for ZeroMQ (ØMQ), a lightweight messaging library that enables fast, asynchronous communication between distributed processes and applications.

BSD-3-Clausecompiled wheel · 3.8+
109.5Mdownloads / mo

See also pmd-net-proto · pytun-pmd3 · icmplib · pymemcache · dpkt · clamav-client · port-for · pydivert · snitun · aioping