Skip to main content

ping in python

Project description

pping

ping in python

Installing

pip install pping

Usage

from pping import ping

# simple usage
result = ping('www.example.com')

# full arguments (default value)
result = ping('www.example.com',
              repeat=4,    # Number of echo requests to send.
              interval=1,  # Time in seconds interval between each request.
              size=32,     # Send buffer size in bytes.
              timeout=1,   # Timeout in seconds to wait for each reply.
              ttl=128)     # Time To Live.

# result properties
print(result)
result[index]
# host
result.hostname
result.aliaslist
result.ipaddrlist
# route trip time
result.times      # timed out are not inclued
result.all_times  # timed out as None
result.avg
result.min
result.max
result.stdev
# packets
result.sent
result.recv
result.lost

License

This project is licensed under the MIT License - see the LICENSE file for details

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

pping-0.0.1.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

pping-0.0.1-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

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