skillfed

aioping

Asyncio ping implementation

aioping v0.4.0 260.4K downloads/30d#8,395 on PyPI92
Copyleft license DORMANT released

What it is and what it does

aioping is an asyncio-native wrapper around ICMP ping that lets you check network reachability and measure latency without blocking your async event loop. It supports both IPv4 and IPv6 addresses and accepts hostnames, resolving them via aiodns. The library offers two main interfaces: a simple ping() function that returns delay in seconds or raises TimeoutError, and a verbose_ping() function that logs results to Python's standard logger.

The package depends on async-timeout for timeout handling and aiodns for asynchronous DNS resolution. It is classified as Production/Stable but has been dormant since mid-2023, meaning it receives no active maintenance. The codebase is straightforward and suitable for applications that need to perform ping checks within an async context without spawning subprocesses or blocking threads.

Use it for:

  • Monitor host availability in async microservices or background task workers without blocking the event loop.
  • Implement health checks for network endpoints in async web frameworks or service meshes.
  • Build network diagnostics tools that measure latency to multiple targets concurrently using asyncio.
  • Test connectivity to remote services during application startup or periodic health verification.
  • Gather network metrics for logging or alerting systems that operate within async contexts.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

aioping provides an asyncio-based ICMP ping implementation for checking network reachability and measuring latency to IPv4, IPv6, or hostname targets.

Yes, if you need async ping in an existing asyncio application and can accept dormant maintenance. The package is stable, has low install friction, and solves a specific problem—non-blocking ICMP ping—that is hard to replicate without subprocess overhead. However, be aware that GPLv2 copyleft applies, and no active development means you inherit any unfixed issues. Suitable for internal tools and services; evaluate carefully for production libraries or proprietary software due to the license.

Install

aioping on PyPI

pip

pip install aioping

uv

uv add aioping

poetry

poetry add aioping

Installing aioping

Before you install

Low friction install with just two runtime dependencies (async-timeout and aiodns). Maintenance is dormant—last release was 2023-07-12 and last commit 2024-01-21—so expect no active bug fixes or feature updates, though the codebase is stable and classifies as Production/Stable.

License in practice

Licensed under GPLv2 (copyleft). Any code that links or distributes aioping must comply with GPLv2 terms, including making source code available under the same license.

Quickstart

import asyncio
import aioping

async def check_host(host):
    try:
        delay = await aioping.ping(host)
        print(f"Ping: {delay * 1000} ms")
    except TimeoutError:
        print("Timed out")

asyncio.run(check_host("google.com"))

Requires Python 3.5 or later; ICMP ping may require elevated privileges on some systems.

Verify before relying

  • Whether elevated privileges (root/admin) are required for ICMP on the target platform.
  • Current compatibility with Python 3.11+ given the last release was July 2023.

Package facts

License not declared (copyleft)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — async-timeout, aiodns
Maintenance dormant — 1,129 days since the last release
Last repo commit
First released
Downloads 260,416/month — #8,395 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aioping-0.4.0-py3-none-any.whl

Keywords: network, icmp, ping, asyncio

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v2 (GPLv2)Programming Language :: Python :: 3.10Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Tags

asyncio ping icmpasync network latency checkpython ping libraryicmp echo request asyncnetwork reachability testasyncio network diagnosticshostname latency measurement
asyncionetwork-diagnosticsicmp

More Python Modules packages