PyPCAPKit - Comprehensive Network Packet Analysis Library
=========================================================
For any technical and/or maintenance information,
please kindly refer to the |docs|_.
.. |docs| replace:: **Official Documentation**
.. _docs: https://jarryshaw.github.io/PyPCAPKit/
The PyPCAPKit project is an open source Python program focus on network packet
parsing and analysis, which works as a comprehensive `PCAP`_ file extraction,
construction and analysis library.
The whole project supports **Python 3.6** or later.
-----
About
-----
PyPCAPKit is a comprehensive Python-native network packet analysis library,
with `DictDumper`_ as its formatted output dumper.
Unlike popular PCAP file extractors, such as `Scapy`_, `DPKT`_, `PyShark`_,
and etc, ``pcapkit`` is designed to be much more comprehensive, which means
it is able to provide more detailed information about the packet, as well as
a more *Pythonic* interface for users to interact with.
Module Structure
----------------
In ``pcapkit``, all files can be described as following eight parts.
- Interface (``pcapkit.interface``)
User interface for the ``pcapkit`` library, which
standardises and simplifies the usage of this library.
- Foundation (``pcapkit.foundation``)
Synthesises file I/O and protocol analysis, coordinates
information exchange in all network layers, as well as
provides the foundamental functions for ``pcapkit``.
- Protocols (``pcapkit.protocols``)
Collection of all protocol family, with detailed
implementation and methods.
- Utilities (``pcapkit.utilities``)
Auxiliary functions and tools for ``pcapkit``.
- CoreKit (``pcapkit.corekit``)
Core utilities for ``pcapkit`` implementation, mainly
for internal data structure and processing.
- ToolKit (``pcapkit.toolkit``)
Auxiliary tools for ``pcapkit`` to support the multiple
extraction engines with a unified interface.
- DumpKit (``pcapkit.dumpkit``)
File output formatters for ``pcapkit``.
- Constants (``pcapkit.const``)
Constant enumerations used in ``pcapkit`` for protocol
family extraction and representation.
Engine Comparison
-----------------
Due to the general overhead of ``pcapkit``, its extraction procedure takes
around *0.2* milliseconds per packet, which is already impressive but not enough
comparing to other popular extration engines availbale on the market, given the
fact that ``pcapkit`` is a **comprehensive** packet processing module.
Additionally, ``pcapkit`` introduced alternative extractionengines to accelerate
this procedure. By now ``pcapkit`` supports `Scapy`_, `DPKT`_, and `PyShark`_.
Test Environment
~~~~~~~~~~~~~~~~
.. list-table::
* - Operating System
- macOS Ventura 13.4.1
* - Chip
- Apple M2 Pro
* - Memory
- 16 GB
Test Results
~~~~~~~~~~~~
============= ===========================
Engine Performance (ms per packet)
============= ===========================
``dpkt`` 0.010390_056723
``scapy`` 0.091690_233567
``pcapkit`` 0.200390_390390
``pyshark`` 24.682185_018351
============= ===========================
------------
Installation
------------
.. note::
``pcapkit`` supports Python versions **since 3.6**.
Simply run the following to install the current version from PyPI:
.. code-block:: shell
pip install pypcapkit
Or install the latest version from the gi repository:
.. code-block:: shell
git clone https://github.com/JarryShaw/PyPCAPKit.git
cd pypcapkit
pip install -e .
# and to update at any time
git pull
And since ``pcapkit`` supports various extraction engines, and extensive
plug-in functions, you may want to install the optional ones:
.. code-block:: shell
# for DPKT only
pip install pypcapkit[DPKT]
# for Scapy only
pip install pypcapkit[Scapy]
# for PyShark only
pip install pypcapkit[PyShark]
# and to install all the optional packages
pip install pypcapkit[all]
# or to do this explicitly
pip install pypcapkit dpkt scapy pyshark
For CLI usage, you will need to install the optional packages:
.. code-block:: shell
pip install pypcapkit[cli]
# or explicitly...
pip install pypcapkit emoji
.. _PCAP: https://en.wikipedia.org/wiki/Pcap
.. _Scapy: https://scapy.net
.. _DPKT: https://dpkt.readthedocs.io
.. _PyShark: https://kiminewt.github.io/pyshark
.. _DictDumper: https://github.com/JarryShaw/DictDumper
Raw data
{
"_id": null,
"home_page": null,
"name": "pypcapkit",
"maintainer": "Jarry Shaw",
"docs_url": null,
"requires_python": "<4,>=3.6",
"maintainer_email": null,
"keywords": "network, pcap, packet",
"author": null,
"author_email": "Jarry Shaw <jarryshaw@icloud.com>",
"download_url": "https://files.pythonhosted.org/packages/3f/fe/d6996e61c59c447675a3ade75b77fa39122ae7be320069d723868b80c047/pypcapkit-1.3.5.post31.tar.gz",
"platform": null,
"description": "PyPCAPKit - Comprehensive Network Packet Analysis Library\n=========================================================\n\n For any technical and/or maintenance information,\n please kindly refer to the |docs|_.\n\n.. |docs| replace:: **Official Documentation**\n.. _docs: https://jarryshaw.github.io/PyPCAPKit/\n\nThe PyPCAPKit project is an open source Python program focus on network packet\nparsing and analysis, which works as a comprehensive `PCAP`_ file extraction,\nconstruction and analysis library.\n\n The whole project supports **Python 3.6** or later.\n\n-----\nAbout\n-----\n\nPyPCAPKit is a comprehensive Python-native network packet analysis library,\nwith `DictDumper`_ as its formatted output dumper.\n\nUnlike popular PCAP file extractors, such as `Scapy`_, `DPKT`_, `PyShark`_,\nand etc, ``pcapkit`` is designed to be much more comprehensive, which means\nit is able to provide more detailed information about the packet, as well as\na more *Pythonic* interface for users to interact with.\n\nModule Structure\n----------------\n\nIn ``pcapkit``, all files can be described as following eight parts.\n\n- Interface (``pcapkit.interface``)\n\n User interface for the ``pcapkit`` library, which\n standardises and simplifies the usage of this library.\n\n- Foundation (``pcapkit.foundation``)\n\n Synthesises file I/O and protocol analysis, coordinates\n information exchange in all network layers, as well as\n provides the foundamental functions for ``pcapkit``.\n\n- Protocols (``pcapkit.protocols``)\n\n Collection of all protocol family, with detailed\n implementation and methods.\n\n- Utilities (``pcapkit.utilities``)\n\n Auxiliary functions and tools for ``pcapkit``.\n\n- CoreKit (``pcapkit.corekit``)\n\n Core utilities for ``pcapkit`` implementation, mainly\n for internal data structure and processing.\n\n- ToolKit (``pcapkit.toolkit``)\n\n Auxiliary tools for ``pcapkit`` to support the multiple\n extraction engines with a unified interface.\n\n- DumpKit (``pcapkit.dumpkit``)\n\n File output formatters for ``pcapkit``.\n\n- Constants (``pcapkit.const``)\n\n Constant enumerations used in ``pcapkit`` for protocol\n family extraction and representation.\n\nEngine Comparison\n-----------------\n\nDue to the general overhead of ``pcapkit``, its extraction procedure takes\naround *0.2* milliseconds per packet, which is already impressive but not enough\ncomparing to other popular extration engines availbale on the market, given the\nfact that ``pcapkit`` is a **comprehensive** packet processing module.\n\nAdditionally, ``pcapkit`` introduced alternative extractionengines to accelerate\nthis procedure. By now ``pcapkit`` supports `Scapy`_, `DPKT`_, and `PyShark`_.\n\nTest Environment\n~~~~~~~~~~~~~~~~\n\n.. list-table::\n\n * - Operating System\n - macOS Ventura 13.4.1\n * - Chip\n - Apple M2 Pro\n * - Memory\n - 16 GB\n\nTest Results\n~~~~~~~~~~~~\n\n============= ===========================\nEngine Performance (ms per packet)\n============= ===========================\n``dpkt`` 0.010390_056723\n``scapy`` 0.091690_233567\n``pcapkit`` 0.200390_390390\n``pyshark`` 24.682185_018351\n============= ===========================\n\n------------\nInstallation\n------------\n\n.. note::\n\n ``pcapkit`` supports Python versions **since 3.6**.\n\nSimply run the following to install the current version from PyPI:\n\n.. code-block:: shell\n\n pip install pypcapkit\n\nOr install the latest version from the gi repository:\n\n.. code-block:: shell\n\n git clone https://github.com/JarryShaw/PyPCAPKit.git\n cd pypcapkit\n pip install -e .\n # and to update at any time\n git pull\n\nAnd since ``pcapkit`` supports various extraction engines, and extensive\nplug-in functions, you may want to install the optional ones:\n\n.. code-block:: shell\n\n # for DPKT only\n pip install pypcapkit[DPKT]\n # for Scapy only\n pip install pypcapkit[Scapy]\n # for PyShark only\n pip install pypcapkit[PyShark]\n # and to install all the optional packages\n pip install pypcapkit[all]\n # or to do this explicitly\n pip install pypcapkit dpkt scapy pyshark\n\nFor CLI usage, you will need to install the optional packages:\n\n.. code-block:: shell\n\n pip install pypcapkit[cli]\n # or explicitly...\n pip install pypcapkit emoji\n\n.. _PCAP: https://en.wikipedia.org/wiki/Pcap\n.. _Scapy: https://scapy.net\n.. _DPKT: https://dpkt.readthedocs.io\n.. _PyShark: https://kiminewt.github.io/pyshark\n.. _DictDumper: https://github.com/JarryShaw/DictDumper\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License",
"summary": "PyPCAPKit: comprehensive network packet analysis library",
"version": "1.3.5.post31",
"project_urls": {
"changelog": "https://github.com/JarryShaw/PyPCAPKit/releases",
"documentation": "https://jarryshaw.github.io/PyPCAPKit/",
"homepage": "https://jarryshaw.github.io/PyPCAPKit/",
"repository": "https://github.com/JarryShaw/PyPCAPKit"
},
"split_keywords": [
"network",
" pcap",
" packet"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "087262f19f402631a7f5f452aeb64d11a6a58d8cb93c7893365686e37650076b",
"md5": "a99f33093b7d0840db6c1420befa7abc",
"sha256": "2dc725c06e9ae09aa2bdbf899759124d1c5e0d7314b1c02996e854ec74c8d278"
},
"downloads": -1,
"filename": "pypcapkit-1.3.5.post31-cp311-none-any.whl",
"has_sig": false,
"md5_digest": "a99f33093b7d0840db6c1420befa7abc",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": "<4,>=3.6",
"size": 973789,
"upload_time": "2025-10-18T10:07:49",
"upload_time_iso_8601": "2025-10-18T10:07:49.195053Z",
"url": "https://files.pythonhosted.org/packages/08/72/62f19f402631a7f5f452aeb64d11a6a58d8cb93c7893365686e37650076b/pypcapkit-1.3.5.post31-cp311-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8cf8a75d91a8031d786a55d0cf955f79cf4fe026672850fad328c1132e955c6f",
"md5": "f91df71435f9a82aee7991cbddc4b40b",
"sha256": "2fd0012b0ff6f7a1775944129d064dcf185e29e4bd093b37cd1d332f6c05e108"
},
"downloads": -1,
"filename": "pypcapkit-1.3.5.post31-cp312-none-any.whl",
"has_sig": false,
"md5_digest": "f91df71435f9a82aee7991cbddc4b40b",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": "<4,>=3.6",
"size": 973789,
"upload_time": "2025-10-18T10:07:47",
"upload_time_iso_8601": "2025-10-18T10:07:47.755920Z",
"url": "https://files.pythonhosted.org/packages/8c/f8/a75d91a8031d786a55d0cf955f79cf4fe026672850fad328c1132e955c6f/pypcapkit-1.3.5.post31-cp312-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5742ba59ef9bd5bbbb11b15804980fedf911bb2f43344262dc7a5fbf725b0eb9",
"md5": "88c4c31d3ebf943fa70f99bdd5a17908",
"sha256": "424d9bdbb01a7b87de535f379ef919d9d1021788b8d7ff38f942c9674e381f6d"
},
"downloads": -1,
"filename": "pypcapkit-1.3.5.post31-cp313-none-any.whl",
"has_sig": false,
"md5_digest": "88c4c31d3ebf943fa70f99bdd5a17908",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": "<4,>=3.6",
"size": 973789,
"upload_time": "2025-10-18T10:08:03",
"upload_time_iso_8601": "2025-10-18T10:08:03.136340Z",
"url": "https://files.pythonhosted.org/packages/57/42/ba59ef9bd5bbbb11b15804980fedf911bb2f43344262dc7a5fbf725b0eb9/pypcapkit-1.3.5.post31-cp313-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5622b0f0324db2cf1cb395128746ed259a4677ea0c5db7635ed6a86474f5e317",
"md5": "7163559715fe3251c91fb5a6045f9420",
"sha256": "484190151b1d51126041137f14dd94ca14a4a65a833ae5f38c48b500b745e885"
},
"downloads": -1,
"filename": "pypcapkit-1.3.5.post31-cp39-none-any.whl",
"has_sig": false,
"md5_digest": "7163559715fe3251c91fb5a6045f9420",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": "<4,>=3.6",
"size": 973789,
"upload_time": "2025-10-18T10:07:55",
"upload_time_iso_8601": "2025-10-18T10:07:55.454931Z",
"url": "https://files.pythonhosted.org/packages/56/22/b0f0324db2cf1cb395128746ed259a4677ea0c5db7635ed6a86474f5e317/pypcapkit-1.3.5.post31-cp39-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "47e0f831527c4c95d08412b4fd72744448a6e8fe797a0f9abbde7ba86cbffd6c",
"md5": "e7975aa90fb1c81fed0468f0ba7235ce",
"sha256": "74959156dd3722ddad621f9c8b52ee02498c3ff9f24fa170b7d1dfd943b2eee0"
},
"downloads": -1,
"filename": "pypcapkit-1.3.5.post31-pp310-none-any.whl",
"has_sig": false,
"md5_digest": "e7975aa90fb1c81fed0468f0ba7235ce",
"packagetype": "bdist_wheel",
"python_version": "pp310",
"requires_python": "<4,>=3.6",
"size": 973789,
"upload_time": "2025-10-18T10:08:05",
"upload_time_iso_8601": "2025-10-18T10:08:05.627737Z",
"url": "https://files.pythonhosted.org/packages/47/e0/f831527c4c95d08412b4fd72744448a6e8fe797a0f9abbde7ba86cbffd6c/pypcapkit-1.3.5.post31-pp310-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f6728bbe5eaf4c9d29721e31b39e798b01fcc43945d297972d9df5e546862689",
"md5": "94523ecf94ac163100ce2577ab82f53d",
"sha256": "d1d88c231e11b447379fbea898029aa836072b8a90ad23f35f95d55507af4d59"
},
"downloads": -1,
"filename": "pypcapkit-1.3.5.post31-pp38-none-any.whl",
"has_sig": false,
"md5_digest": "94523ecf94ac163100ce2577ab82f53d",
"packagetype": "bdist_wheel",
"python_version": "pp38",
"requires_python": "<4,>=3.6",
"size": 973739,
"upload_time": "2025-10-18T10:08:14",
"upload_time_iso_8601": "2025-10-18T10:08:14.349125Z",
"url": "https://files.pythonhosted.org/packages/f6/72/8bbe5eaf4c9d29721e31b39e798b01fcc43945d297972d9df5e546862689/pypcapkit-1.3.5.post31-pp38-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f71fabeb3a8ee3b476edbab9301320f21bc2ddbb8c16171b6f65e765f0bd855e",
"md5": "6d75841b3230f28885474eeef543a488",
"sha256": "1e43b81cb512f6fa65f608cddb8973052a8975a1ecf03c16a6955bf5ae870f94"
},
"downloads": -1,
"filename": "pypcapkit-1.3.5.post31-pp39-none-any.whl",
"has_sig": false,
"md5_digest": "6d75841b3230f28885474eeef543a488",
"packagetype": "bdist_wheel",
"python_version": "pp39",
"requires_python": "<4,>=3.6",
"size": 973789,
"upload_time": "2025-10-18T10:08:03",
"upload_time_iso_8601": "2025-10-18T10:08:03.525366Z",
"url": "https://files.pythonhosted.org/packages/f7/1f/abeb3a8ee3b476edbab9301320f21bc2ddbb8c16171b6f65e765f0bd855e/pypcapkit-1.3.5.post31-pp39-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3ffed6996e61c59c447675a3ade75b77fa39122ae7be320069d723868b80c047",
"md5": "eb67c6be86cfde2cfe6427d507be2c84",
"sha256": "baf177f302eaf9389d86d5baa133bb10c2cfd0f2fceddff88b991fc29d0c25a2"
},
"downloads": -1,
"filename": "pypcapkit-1.3.5.post31.tar.gz",
"has_sig": false,
"md5_digest": "eb67c6be86cfde2cfe6427d507be2c84",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.6",
"size": 669221,
"upload_time": "2025-10-18T10:08:04",
"upload_time_iso_8601": "2025-10-18T10:08:04.602660Z",
"url": "https://files.pythonhosted.org/packages/3f/fe/d6996e61c59c447675a3ade75b77fa39122ae7be320069d723868b80c047/pypcapkit-1.3.5.post31.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-18 10:08:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "JarryShaw",
"github_project": "PyPCAPKit",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pypcapkit"
}