Skip to main content

A cross-platform Python wrapper around the `ping` utility.

Project description

PingPy

GitHub commit activity GitHub code size in bytes tests

A cross platform wrapper for the ping utility written in Python.

Description

pingpy is a Python interface that uses subprocess to call the platform's ping utility. The pingpy CLI accepts a subset of ping's args and unifies the interface (i.e. -c now always means "count" with pingpy), and translates the pingpy args to the platform's ping implementation.

Usage

Run pingpy --help to see usage instructions.

usage: pingpy [-h] [-c COUNT] [-v] [-d] [-f FILE] [-o] [-a] [-s SLEEP] target

Ping a specified target with options for repeat count, debugging & verbosity level, and optional logging to file.

positional arguments:
  target                Target IP address or hostname to ping

options:
  -h, --help            show this help message and exit
  -c COUNT, --count COUNT
                        Number of times to ping. Default: 3, 0=infinite.
  -v, --verbose         Enable verbose output
  -d, --debug           Enable debug logging
  -f FILE, --file FILE  Path to the log file
  -o, --overwrite       Overwrite the log file if it exists
  -a, --append          Append to the log file if it exists
  -s SLEEP, --sleep SLEEP
                        Number of seconds to wait between pings. Default: 1.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pingpy-0.1.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

pingpy-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file pingpy-0.1.0.tar.gz.

File metadata

  • Download URL: pingpy-0.1.0.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.24

File hashes

Hashes for pingpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d1c7de10b5a4cbe9a48e0b255bfb7809543f0e4f88c6336f3b4e0167f815f8c4
MD5 41213ef6343189811144f80b0849ffb9
BLAKE2b-256 7e9bfb0ea56be896545a231e149fa094b580ce1900ff0faf3769a6b6631fe425

See more details on using hashes here.

File details

Details for the file pingpy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pingpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.24

File hashes

Hashes for pingpy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d05c9cfb2d305791cccc0e25e44d41bea1d619c78c2e74719abdc55089cdc94
MD5 d3b318a37b002c48fff001ea6807156c
BLAKE2b-256 7c651576fb8f766d1cea3e13b8f776b72bfc3692cdf6393812c959d76894eb34

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page