Registry / http-networking / pingparsing

pingparsing

JSON →
library1.4.2pypypi✓ verified 86d ago

pingparsing is a CLI tool and Python library for parsing and transmitting ping command output. Current version 1.4.2 requires Python >=3.7. It parses ICMP reply statistics, supports multiple platforms (Linux, macOS, Windows), and provides ping transmission and result serialization. Release cadence is irregular, with minor updates every few months.

pip install pingparsing
INSTALL
IMPORT
SIG · PINGPARSING
P
pingparsing
http-networkingpythonv1.4.2
Install
3.1s avg
Import
389ms
Disk
40MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.4.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.412s · 40.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.1s · import 0.366s · 41MB
40MB installed
● package 40MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PingTransmitter
from pingparsing import PingTransmitter
from pingparsing.transmitter import PingTransmitter
Direct import from pingparsing is the recommended public API.
PingParsing
from pingparsing import PingParsing
from pingparsing.parser import PingParsing
The parser class is exposed at the top level.
IcmpReplyStatistics
from pingparsing import IcmpReplyStatistics
Used for accessing parsed statistics object.

Transmit pings and parse the output into a dictionary.

import os from pingparsing import PingTransmitter, PingParsing transmitter = PingTransmitter() transmitter.destination = os.environ.get('PING_DEST', '8.8.8.8') transmitter.count = 3 result = transmitter.ping() parser = PingParsing() parser.parse(result) stats = parser.as_dict() print(stats)
pingparsing --version
Debug
Known issues
gotchaThe library parses the output of the system `ping` command, which varies by OS/version. Parsing may fail on uncommon ping implementations (e.g., BusyBox, embedded systems).
fix
Test on target platforms; use `PingTransmitter` with `ping_option='-O'` on Linux for timestamp support.
affects: all
breakingIn v1.4.0, support for pyparsing v2 was dropped. Code using pyparsing v2 API directly will break.
fix
Update pyparsing to v3.x or pin pingparsing to <1.4.0.
affects: >=1.4.0
deprecatedPython 3.6 support was dropped in v1.4.2. Users on Python 3.6 must stay on older versions.
fix
Upgrade Python to 3.7+.
affects: >=1.4.2
gotchaThe library requires root/admin privileges to set ping options like `--interval` or `--timeout` on some systems (e.g., Linux).
fix
Run the script with appropriate privileges or use default options.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pingparsing'
Library not installed or installed in a different environment.
fix
Run `pip install pingparsing` in the correct Python environment.
AttributeError: 'PingParsing' object has no attribute 'parse'
Using outdated import or method name.
fix
Use `PingParsing().parse(result)` (the method is `parse`, not `parse_output`).
pingparsing.errors.PingError: ping command not found
System does not have `ping` command in PATH.
fix
Ensure `ping` is installed and accessible (e.g., install iputils-ping on Linux).
Upgrade
Version history
1.4.2latest on PyPI · released May 2, 2024
Audit
Dependencies
typepyrequiredRequired for type conversion and parsing
humanreadablerequiredRequired for human-readable time/duration formatting
pyparsingrequiredRequired for parsing ping output text
Agent activity
4 hits · last 30 days
node
4
Resources
pingparsing — pip install pingparsing · libregistry