--- id: icmplib version: "3.0.4" license: GNU Lesser General Public License v3.0 license_treatment: copyleft maintenance: dormant --- # icmplib — Easily forge ICMP packets and make your own ping and traceroute. License: copyleft · Maintenance: dormant · Downloads: 1.2M/mo ## What it is and what it does icmplib is a pure Python ICMP protocol implementation that lets you send ping requests, perform concurrent multiping operations, and run traceroute diagnostics without external dependencies. It works with both IPv4 and IPv6 addresses, supports asynchronous operations via asyncio, and can run in either privileged mode (full packet control, typically requires root) or unprivileged mode (kernel-managed, no special privileges needed). The library is designed for developers who need to build network diagnostics tools, monitor host reachability, or implement custom ICMP-based applications. It provides ready-to-use functions like `ping()`, `multiping()`, and `traceroute()` for common tasks, as well as low-level socket classes (`ICMPv4Socket`, `ICMPv6Socket`) for building custom implementations. Cross-platform support for Linux, macOS, and Windows is built in. Use it for: - Check if a host is reachable and measure latency with ping() or async_ping() in monitoring scripts - Perform concurrent reachability checks on multiple hosts using multiping() for network surveys - Build network diagnostics tools that trace the path packets take to a destination with traceroute() - Implement custom ICMP-based applications by working directly with ICMPv4Socket and ICMPv6Socket classes - Monitor network quality metrics like jitter and packet loss in real-time applications ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. icmplib provides a pure Python implementation of the ICMP protocol for sending ping, multiping, and traceroute requests, with support for both IPv4 and IPv6, synchronous and asynchronous operations, and custom socket-level control. Yes, for network diagnostics and monitoring tasks. The package is stable, dependency-free, and widely used (top 5000 on PyPI). The main consideration is that maintenance is dormant as of the fact sheet date—verify compatibility with your Python version and that any security or compatibility issues with recent Python releases have been addressed before adopting in production. ## Install pip install icmplib uv add icmplib poetry add icmplib ## Installing icmplib Before you install: Installation is straightforward with no external dependencies. The package is marked Production/Stable and has been actively maintained since 2019, though the last release was in October 2023 and the repository shows dormant status as of the fact sheet date. License in practice: Licensed under GNU Lesser General Public License v3.0 (copyleft). You may use and modify the library freely, but any derivative works must also be licensed under LGPLv3 and source code must be made available to recipients. Quickstart: pip install icmplib from icmplib import ping host = ping('1.1.1.1', count=4) print(f"Host {host.address} is alive: {host.is_alive}") print(f"Average RTT: {host.avg_rtt} ms") Requires Python 3.7 or later. On Unix systems, privileged mode (default) requires root or appropriate capabilities; unprivileged mode available but requires kernel support. Verify before relying: - Whether the dormant maintenance status (last release October 2023) affects stability or security for current Python versions - Specific behavior differences between privileged and unprivileged modes on different operating systems ## Package facts - License: GNU Lesser General Public License v3.0 (copyleft) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ping library python, icmp protocol implementation, network diagnostics python, traceroute python, async ping, ipv6 ping support, multiping concurrent, raw icmp sockets, network-diagnostics, async-io, ipv6-ready [View on SkillFed](https://skillfed.io/packages/icmplib) · [View on PyPI](https://pypi.org/project/icmplib/)