skillfed

pypcap

pypcap -- Python interface to pcap a packet capture library

pypcap v1.3.0 187.5K downloads/30d#9,964 on PyPI304
License unclear Abandoned released

What it is and what it does

Pypcap is a Python wrapper around libpcap, the standard packet-capture library used by tcpdump and other network tools. It provides an object-oriented interface to capture live network traffic from a specified interface, allowing you to iterate over packets and extract headers and payload data. The package works on both Linux and Windows, though the description notes WinPcap has compatibility issues with Windows 10.

The library is designed for network analysis, packet inspection, and traffic monitoring tasks where you need direct access to link-layer frames. It has no Python runtime dependencies but requires compilation of C extensions and system-level packet-capture libraries to be present before installation. The project is currently unmaintained and the authors are seeking a new maintainer.

Use it for:

  • Build a network packet sniffer to monitor and log traffic on a specific interface for debugging or security analysis.
  • Analyze network protocols by capturing raw packets and extracting source and destination addresses.
  • Create a network traffic monitor component that needs to inspect live packets as they arrive.
  • Develop packet-level network diagnostics tools that require direct access to link-layer frames.

Worth the install?

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

Python wrapper around libpcap that lets you capture and inspect network packets at the link layer, with support for both Linux and Windows systems.

No—install only if you have a specific, legacy requirement. The project is unmaintained and actively seeking a new maintainer; the last commit was 2023-03-29. High installation friction (system dependencies, C compilation), unclear licensing, and no Python version guarantees make this a poor choice for new projects.

Install

pypcap on PyPI

pip

pip install pypcap

uv

uv add pypcap

poetry

poetry add pypcap

Installing pypcap

Before you install

Installation requires system-level dependencies (libpcap-dev on Linux, Npcap SDK on Windows) and compiles C extensions, creating high friction. The project is explicitly unmaintained; the last commit was 2023-03-29 and maintainers are actively seeking someone to take over.

License in practice

License treatment is unclear—no SPDX identifier or raw license text is provided in the package metadata, making it uncertain what restrictions or permissions apply to use or modification.

Quickstart

pip install pypcap

# Capture packets from network interface
sniffer = pcap.pcap(name=None, promisc=True, immediate=True, timeout_ms=50)
for ts, pkt in sniffer:
    print(ts, pkt)

Requires libpcap-dev (Linux) or Npcap SDK (Windows) to be installed before pip install; compiles C extensions during installation.

Verify before relying

  • Whether the 2023-03-29 commit represents a stable state or stalled development.
  • What the actual license is, given the unclear treatment in metadata.
  • Python version compatibility—requires_python is unspecified in the metadata.
  • Whether WinPcap compatibility issues with Windows 10 affect current Windows deployments.

Package facts

License not declared (unclear)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 1,432 days since the last release
Last repo commit
First released
Downloads 187,456/month — #9,964 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pypcap-1.3.0.tar.gz

Tags

packet capture pythonnetwork sniffer librarylibpcap wrapperpcap python interfacelive packet sniffingnetwork traffic analysis
packet-capturenetwork-analysisunmaintained

More Networking packages