{"id":21691,"library":"pingparsing","title":"pingparsing","description":"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.","status":"active","version":"1.4.2","language":"python","source_language":"en","source_url":"https://github.com/thombashi/pingparsing","tags":["ping","network","parsing","icmp","cli"],"install":[{"cmd":"pip install pingparsing","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for type conversion and parsing","package":"typepy","optional":false},{"reason":"Required for human-readable time/duration formatting","package":"humanreadable","optional":false},{"reason":"Required for parsing ping output text","package":"pyparsing","optional":false}],"imports":[{"note":"Direct import from pingparsing is the recommended public API.","wrong":"from pingparsing.transmitter import PingTransmitter","symbol":"PingTransmitter","correct":"from pingparsing import PingTransmitter"},{"note":"The parser class is exposed at the top level.","wrong":"from pingparsing.parser import PingParsing","symbol":"PingParsing","correct":"from pingparsing import PingParsing"},{"note":"Used for accessing parsed statistics object.","symbol":"IcmpReplyStatistics","correct":"from pingparsing import IcmpReplyStatistics"}],"quickstart":{"code":"import os\nfrom pingparsing import PingTransmitter, PingParsing\n\ntransmitter = PingTransmitter()\ntransmitter.destination = os.environ.get('PING_DEST', '8.8.8.8')\ntransmitter.count = 3\nresult = transmitter.ping()\n\nparser = PingParsing()\nparser.parse(result)\nstats = parser.as_dict()\nprint(stats)","lang":"python","description":"Transmit pings and parse the output into a dictionary."},"warnings":[{"fix":"Test on target platforms; use `PingTransmitter` with `ping_option='-O'` on Linux for timestamp support.","message":"The 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).","severity":"gotcha","affected_versions":"all"},{"fix":"Update pyparsing to v3.x or pin pingparsing to <1.4.0.","message":"In v1.4.0, support for pyparsing v2 was dropped. Code using pyparsing v2 API directly will break.","severity":"breaking","affected_versions":">=1.4.0"},{"fix":"Upgrade Python to 3.7+.","message":"Python 3.6 support was dropped in v1.4.2. Users on Python 3.6 must stay on older versions.","severity":"deprecated","affected_versions":">=1.4.2"},{"fix":"Run the script with appropriate privileges or use default options.","message":"The library requires root/admin privileges to set ping options like `--interval` or `--timeout` on some systems (e.g., Linux).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install pingparsing` in the correct Python environment.","cause":"Library not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'pingparsing'"},{"fix":"Use `PingParsing().parse(result)` (the method is `parse`, not `parse_output`).","cause":"Using outdated import or method name.","error":"AttributeError: 'PingParsing' object has no attribute 'parse'"},{"fix":"Ensure `ping` is installed and accessible (e.g., install iputils-ping on Linux).","cause":"System does not have `ping` command in PATH.","error":"pingparsing.errors.PingError: ping command not found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}