skillfed

pytun-pmd3

python-pytun fork with darwin and windows support (IPv6-ONLY)

pytun-pmd3 v3.0.3 321.0K downloads/30d#7,627 on PyPI8
Copyleft license Copyright (c) 2011, montag451. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) AGING released

What it is and what it does

pytun-pmd3 is a Python wrapper around the TUN/TAP interface creation and management APIs on Linux and macOS. It allows developers to programmatically create virtual network interfaces at the packet level, enabling use cases like network tunneling, packet filtering, and custom network protocol implementation. The package is a fork of the original pytun project with added support for Darwin (macOS) and Windows keywords, though support is described as partial.

The package has no external runtime dependencies, making installation straightforward. It supports Python 3.9 through 3.13 and requires at least Python 3.8. The codebase is aging with infrequent updates, and the small repository size suggests it serves a niche audience. Users should be aware that creating TUN/TAP interfaces typically requires elevated privileges (root or capabilities) on the host system.

Use it for:

  • Build VPN or tunneling applications that need direct control over virtual network interfaces
  • Implement custom network protocols or packet filters at the kernel interface level
  • Create network simulation or testing environments that require virtual network devices
  • Develop tools for network packet capture and manipulation on macOS or Linux systems

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Python bindings to create and manage TUN/TAP virtual network interfaces on Linux and Darwin (macOS), enabling low-level network packet manipulation and tunneling.

Yes, if you need TUN/TAP interface control on Linux or macOS and accept the copyleft license. The low install friction and lack of dependencies make it straightforward to add. However, the aging maintenance status and small user base mean you should verify that Darwin support meets your needs and be prepared to maintain a fork if critical bugs emerge.

Install

pytun-pmd3 on PyPI

pip

pip install pytun-pmd3

uv

uv add pytun-pmd3

poetry

poetry add pytun-pmd3

Installing pytun-pmd3

Before you install

Low install friction with no runtime dependencies. Maintenance status is aging—last commit was 2026-01-27 and the repository has only 8 stars, suggesting limited active development and a small user base.

License in practice

Licensed under GPLv3+, a copyleft license requiring derivative works and modifications to be distributed under the same terms. Use is unrestricted for private purposes, but redistribution of modified versions must include source code.

Quickstart

pip install pytun-pmd3

import pytun
# Create a TUN interface
tun = pytun.TunTapDevice(name='tun0', flags=pytun.IFF_TUN)
tun.up()
# Read/write packets from/to the interface

Requires root or appropriate capabilities to create TUN/TAP interfaces on Linux; macOS support is partial and may require system configuration.

Verify before relying

  • Extent of Darwin/macOS support and any known limitations or missing features compared to Linux
  • Whether IPv6-only mode is a hard requirement or a configuration option
  • Current maintenance status and likelihood of future updates or bug fixes

Package facts

License Copyright (c) 2011, montag451. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) (copyleft)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 199 days since the last release
Last repo commit
First released
Downloads 320,958/month — #7,627 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytun_pmd3-3.0.3-py3-none-any.whl

Keywords: tun, tuntap, darwin, pymobiledevice3, macos, windows

Development Status :: 5 - Production/StableLicense :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

tun tap interface pythonvirtual network interface linux macosnetwork packet tunneling pythontuntap wrapper darwinlow-level network interface pythonvirtual network device creationpacket-level networking
network-interfaceslow-level-networkingsystem-administration

More Networking packages