--- id: pythonping version: "1.1.4" license: MIT license_treatment: permissive maintenance: dormant --- # pythonping — A simple way to ping in Python License: permissive · Maintenance: dormant · Downloads: 492.4K/mo ## What it is and what it does Pythonping is a Python library for sending ICMP echo requests (pings) to remote hosts, mimicking the behavior of the terminal ping command. It exposes a simple `ping()` function for basic use and modular classes (`Communicator`, `PayloadProvider`) for integration into larger applications. The library constructs raw IP packets and captures responses, returning a `ResponseList` object containing individual `Response` items with latency, packet size, and error information. The package is designed for network diagnostics, host reachability testing, and latency measurement in Python scripts and applications. It supports customization via parameters like payload size, timeout, packet count, sweep ranges, and the Don't Fragment flag. Because ICMP requires raw socket access, the package mandates root or administrator privileges on all operating systems—a fundamental OS-level constraint, not a library limitation. Use it for: - Monitor host availability in a network management or alerting system by periodically pinging targets and collecting latency metrics. - Perform network diagnostics in a troubleshooting script to verify connectivity and measure latency to remote servers. - Implement a ping sweep to test a range of payload sizes and detect MTU or fragmentation issues on a network path. - Integrate ICMP probing into a custom application that needs to detect network outages or measure end-to-end latency without spawning subprocesses. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Sends ICMP ping requests to remote hosts from Python, returning response metadata like latency and success status, with optional verbose terminal-style output. Yes, if you need ICMP ping from Python and can run as root. The library is stable (Production/Stable classifier), has no dependencies, and carries no known vulnerabilities. However, maintenance is dormant (last release 2022-10-25); verify compatibility with your Python version before deploying. The root requirement is a hard constraint—unsuitable for unprivileged environments. ## Install pip install pythonping uv add pythonping poetry add pythonping ## Installing pythonping Before you install: Low install friction; pure Python wheel with no runtime dependencies. Maintenance is dormant—last release was 2022-10-25, over 1389 days ago, though the repository remains active with recent commits (2024-07-18). Suitable for stable use cases but do not expect rapid bug fixes or feature updates. License in practice: MIT license (permissive) places no restrictions on use, modification, or distribution. Safe to incorporate into proprietary or open-source projects without licensing obligations. Quickstart: from pythonping import ping result = ping('127.0.0.1', verbose=True) for response in result: print(response) Requires root or administrator privileges to create raw ICMP packets and access the network interface; cannot run as an unprivileged user. Verify before relying: - Whether the package works reliably on modern Python versions (requires_python is unspecified in metadata). - Current state of cross-platform support (Windows, macOS, Linux) given dormant maintenance status. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 492.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags icmp ping from python, network reachability testing, send ping packets programmatically, host latency measurement, python icmp client, network diagnostics library, remote host availability check, network-diagnostics, icmp, requires-root [View on SkillFed](https://skillfed.io/packages/pythonping) · [View on PyPI](https://pypi.org/project/pythonping/)