ping#

class platypush.plugins.ping.PingPlugin(executable: str = 'ping', count: int = 1, timeout: float = 5.0, **kwargs)[source]#

Bases: Plugin

Perform ICMP network ping on remote hosts.

__init__(executable: str = 'ping', count: int = 1, timeout: float = 5.0, **kwargs)[source]#
Parameters:
  • executable – Path to the ping executable. Default: the first ping executable found in PATH.

  • count – Default number of packets that should be sent (default: 1).

  • timeout – Default timeout before failing a ping request (default: 5 seconds).

ping(host: str, count: int | None = None, timeout: float | None = None) PingResponse[source]#

Ping a remote host. :param host: Remote host IP or name :param count: Number of packets that should be sent (default: 1). :param timeout: Timeout before failing a ping request (default: 5 seconds).