pydivert
Python binding to windivert driver
Decision gist · record as of 2026-08-14
Yes, if you are on Windows 11 64-bit and need low-level network packet control from Python. The package is actively maintained, has no runtime dependencies, includes bundled binaries for easy setup, and supports modern Python versions. The copyleft license (LGPL/GPL) is a hard blocker for proprietary closed-source applications unless you can relicense. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Windows 11 64-bit, Python 3.10+, and administrator privileges to run; WinDivert driver must be loaded by the OS.
- Installation is straightforward with no runtime dependencies and low friction.
- The package is actively maintained with a recent release and includes bundled WinDivert binaries, eliminating manual driver setup.
License · maintenance · safety
LGPL-3.0-or-later OR GPL-2.0-or-later (copyleft) — PyDivert is dual-licensed under LGPL-3.0-or-later and GPL-2.0-or-later (copyleft). Any derivative work must comply with both licenses; proprietary applications using this package must either adopt a compatible copyleft license or obtain a separate commercial license.
last release 2026-05-15 (91 days) · last repo commit 2026-08-05 · 244 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 291,298 downloads/mo, #7,971 on PyPI
Alternatives
Verify before relying
pip install pydivert
import pydivert
with pydivert.WinDivert("tcp.DstPort == 80") as w:
for packet in w:
print(f"Captured: {packet}")
w.send(packet)- Whether Windows Server actually works despite being untested in the documentation.
- Performance characteristics under high packet volume or complex filter rules.
- Compatibility with Windows Defender or other security software that may interfere with driver access.
What it is and what it does
PyDivert wraps the WinDivert driver to give Python code direct access to the Windows network stack at the user-mode level. You can intercept packets matching a filter expression, inspect or modify their headers and payloads, drop them, or re-inject them. The package includes bundled WinDivert 2.2+ binaries so you don't have to install the driver separately.
It supports both synchronous and asynchronous workflows via asyncio, modern Python pattern matching (PEP 634), and advanced WinDivert features like FLOW, SOCKET, and REFLECT layers. Common use cases include building firewalls, monitoring or modifying network traffic, redacting sensitive payloads, and analyzing TCP/IP behavior. Requires Windows 11 64-bit, Python 3.10+, and administrator privileges.
Use it for
- Build a local firewall that blocks traffic from specific IP addresses or ports by dropping packets before they reach their destination.
- Monitor and log HTTP/HTTPS traffic on a machine for debugging or security auditing purposes.
- Redact or modify sensitive data (tokens, credentials) in network payloads before they leave the system.
- Analyze TCP/IP behavior and test network stack interactions by capturing and inspecting real packets.
- Implement packet-level rate limiting or traffic shaping by intercepting and selectively dropping or delaying packets.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are on Windows 11 64-bit and need low-level network packet control from Python.
The package is actively maintained, has no runtime dependencies, includes bundled binaries for easy setup, and supports modern Python versions. The copyleft license (LGPL/GPL) is a hard blocker for proprietary closed-source applications unless you can relicense. No known security vulnerabilities.
Install
pydivert on PyPI
Before you install
Installation is straightforward with no runtime dependencies and low friction. The package is actively maintained with a recent release and includes bundled WinDivert binaries, eliminating manual driver setup. However, it requires Windows 11 64-bit and administrator privileges to function.
Requires Windows 11 64-bit, Python 3.10+, and administrator privileges to run; WinDivert driver must be loaded by the OS.
License in practice
PyDivert is dual-licensed under LGPL-3.0-or-later and GPL-2.0-or-later (copyleft). Any derivative work must comply with both licenses; proprietary applications using this package must either adopt a compatible copyleft license or obtain a separate commercial license.
Quickstart
pip install pydivert
import pydivert
with pydivert.WinDivert("tcp.DstPort == 80") as w:
for packet in w:
print(f"Captured: {packet}")
w.send(packet)
Verify before relying
- Whether Windows Server actually works despite being untested in the documentation.
- Performance characteristics under high packet volume or complex filter rules.
- Compatibility with Windows Defender or other security software that may interfere with driver access.
Package facts
| License | LGPL-3.0-or-later OR GPL-2.0-or-later copyleft |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 91 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 291,298 / month, #7,971 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Win32 (MS Windows)Intended Audience :: DevelopersIntended Audience :: System AdministratorsIntended Audience :: Telecommunications IndustryLicense :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)Operating System :: Microsoft :: Windows :: Windows 11Programming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Networking :: FirewallsTopic :: System :: Networking :: MonitoringTopic :: Utilities |
Evidence: pydivert-3.1.3-py3-none-any.whl
Tags
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 › “network packet capture windows”
- pydivertPyDivert is a Python binding for the WinDivert Windows driver that…
- pypcapPython wrapper around libpcap that lets you capture and inspect…
- scapyScapy is a Python library for forging, decoding, sending, and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also mitmproxy-windows · scapy · pypcap · dpkt · pyshark · impacket · pmd-net-proto · python-pcapng · pyrad · mitmproxy-wireguard