ping3
A pure python3 version of ICMP ping implementation using raw socket.
Decision gist · record as of 2026-08-14
Yes, if you need ICMP ping from Python and can work with the privilege requirement. The package is stable, actively maintained, has no external dependencies, and carries permissive licensing. It is well-suited for network diagnostics and connectivity checks in applications or scripts. The main gotcha is that most platforms require root or administrator privileges to send raw ICMP packets.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- On most platforms, sending ICMP packets requires root or administrator privileges; some systems may need `sudo ping3` or equivalent elevated permissions.
- Low install friction with no runtime dependencies.
- Active maintenance with recent commits and a stable release history since 2017.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal obligations, making it safe for commercial and private projects.
last release 2025-08-10 (369 days) · last repo commit 2026-03-16 · 347 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 786,264 downloads/mo, #5,067 on PyPI
Alternatives
Verify before relying
pip install ping3
from ping3 import ping
delay = ping('example.com') # Returns delay in seconds, False if host unknown, None if timeout
print(delay)- Whether the package works reliably across Windows, macOS, and Linux without platform-specific workarounds beyond privilege requirements.
- Performance characteristics when pinging many hosts concurrently or in rapid succession.
What it is and what it does
Ping3 is a pure Python implementation of ICMP ping that uses raw sockets to send echo requests and measure network latency. It works with both IPv4 and IPv6 addresses, supports custom timeouts, packet sizes, TTL values, and source addresses or interfaces. The package offers both a programmatic API (ping and verbose_ping functions) and a command-line tool.
The main use case is network diagnostics and connectivity testing from within Python applications without spawning external ping processes. It returns the round-trip delay as a float, False when a host cannot be resolved, or None on timeout. Optional DEBUG and EXCEPTIONS modes provide detailed packet inspection or exception-based error handling instead of return values.
Use it for
- Check if a remote host is reachable and measure latency before attempting a connection.
- Monitor network connectivity in a background service or health-check daemon.
- Diagnose network issues by pinging multiple hosts with custom timeouts and TTL values.
- Build a network topology or reachability map by pinging a range of IP addresses.
- Test IPv6 connectivity explicitly or auto-detect the appropriate protocol version.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need ICMP ping from Python and can work with the privilege requirement.
The package is stable, actively maintained, has no external dependencies, and carries permissive licensing. It is well-suited for network diagnostics and connectivity checks in applications or scripts. The main gotcha is that most platforms require root or administrator privileges to send raw ICMP packets.
Install
ping3 on PyPI
Before you install
Low install friction with no runtime dependencies. Active maintenance with recent commits and a stable release history since 2017. Requires Python 3.5 or later.
On most platforms, sending ICMP packets requires root or administrator privileges; some systems may need `sudo ping3` or equivalent elevated permissions.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal obligations, making it safe for commercial and private projects.
Quickstart
pip install ping3
from ping3 import ping
delay = ping('example.com') # Returns delay in seconds, False if host unknown, None if timeout
print(delay)
Verify before relying
- Whether the package works reliably across Windows, macOS, and Linux without platform-specific workarounds beyond privilege requirements.
- Performance characteristics when pinging many hosts concurrently or in rapid succession.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.5 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 369 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 786,264 / month, #5,067 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: End Users/DesktopProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: System :: Networking |
Evidence: ping3-5.1.5-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “host reachability check”
- ping3Ping3 sends ICMP echo requests to hosts and measures round-trip time…
- pythonpingSends ICMP ping requests to remote hosts from Python, returning…
- aiopingaioping provides an asyncio-based ICMP ping implementation for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
uvloop is a drop-in replacement for Python's built-in asyncio event loop, implemented in Cython and using libuv, that accelerates async I/O operations.
execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.
However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…
PyZMQ provides Python bindings for ZeroMQ (ØMQ), a lightweight messaging library that enables fast, asynchronous communication between distributed processes and applications.
See also aioping · pingparsing · pythonping · icmplib · speedtest-cli · multiping · inputimeout · mcstatus · ipaddress · IP2Location