Skip to main content

zwiftpktmon

A Python port of the C# ZwiftPacketMonitor project which monitors Zwift UDP packets.

This project implements a TCP and UDP packet monitor for the Zwift cycling simulator. It listens for packets on a specific port of a local network adapter, and when found, deserializes the payload and dispatches events that can be consumed by the caller. It uses the asyncio standard library to allow the packet parsing activities to not interfere with the event consumer.

NOTE: Because this utilizes a network packet capture to intercept the UDP packets, your system may require this code to run using elevated privileges. This is definitely required on MacOS.

Requirements

  • Requires Python version 3.10 or higher

  • Uses the project pcapy-ng as its interface to the Pcap-API. The Pcap-API exists natively on MacOS and Linux but not on Windows. On Windows, the Npcap packet capture library must be installed. Npcap is available here: https://npcap.com/dist/npcap-1.60.exe

  • The pcapy-ng library is written in Cython at must be compiled for each environment. Currently, two environments have been pre-compiled and supported:

    • Windows 10+ (64bit AMD; Intel might work but untested)
    • MacOS 10.13+ (High Sierra)

Setup

pip install zwiftpktmon

There are some example scripts in the .\tests folder:

  • test_harness.py: A simple script allowing network selection and event logging.
  • test_harness_ui.py: A simple UI based upon PySimpleGui. To use this you must pip install PySimpleGui first.

Metadata

Release files for zwiftpktmon 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zwiftpktmon 0.1.0
File Size Uploaded
zwiftpktmon-0.1.0.tar.gz 15.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zwiftpktmon 0.1.0
File Interpreter ABI Platform
zwiftpktmon-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.8 kB

Release files / zwiftpktmon-0.1.0.tar.gz

Download URL zwiftpktmon-0.1.0.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c3c5ad0b7c467618443c07a77a1097379c36a4b9d8870f4f8d2cf7f89d5c4d6d
BLAKE2b-256 checksum
How to use checksums
b93e1314034f686d0da45c03c309198304d94af85b2fb72a393ebaa5dd0b23dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release files / zwiftpktmon-0.1.0-py3-none-any.whl

Download URL zwiftpktmon-0.1.0-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2752e4620f72052816ab4bf0fb5be5b335e031d004ab9825328f738a7c80aa9
BLAKE2b-256 checksum
How to use checksums
1662d94ad12b646c660bcd458168186b928dd020238184bbcba2d5632fbef987
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page