Skip to main content

pingping is a special library which understands multi linguistic of ping output and translated the result to machine understandable format.

Project description

Multi Linguistic Ping (pingping)

License: MIT Build Status Downloads GitHub issues open Known Vulnerabilities

Introduction

pingping is a special library which understands multi linguistic of ping output and translated the result to machine understandable format. i.e. Json

pingping is a vendor independent library where you can parse any language ping output

pingping support tcping which works on transport layer i.e. Ping on proxy server, here ping refers to seding packets via tcp protocol to check the connectivity.

Docs

How to use pingping?

  • Command Line
    Type pingping <ip-address> or pingping <ip-address> --web. For more help type pingping -h

  • Python
    It's very simple, create an object of Ping and call ping method with ip address. Internally it calls system ping command and captures the needed result.

How to run ping command?

# cli
pingping 192.168.1.1
pingping 1.1.1.1

# python code
obj = Ping()
print(obj.ping('192.168.1.1'))
print(obj.ping('1.1.1.1'))

It returns Json output and easy to understand by the keys of it.

{"ip": "192.168.1.1", "loss_percentage": 100.0}
{"ip": "1.1.1.1", "loss_percentage": 0.0, "min": 55.669, "avg": 78.198, "max": 130.778, "time_in": "ms"}

How to capture result from ping output?

I am having ping result how to analise the output of it.

Ping.fetch_ping_data(ping_output) # it's a class method.

It automatically identifies the ip address and important details from it. It doesn't have any language barier.

{"ip": "1.1.1.1", "loss_percentage": 0.0, "min": 55.669, "avg": 78.198, "max": 130.778, "time_in": "ms"}

Commands

Usage pingping  <ip-address>
                -c | --count <Number>
                -l4 | --web | --tcp | --http (ping over proxy)
                -h | --help

Pre-requisites

pingping supports both trains of python 2.7+ and 3.1+, the OS should not matter.

  • shconfparser is used to captured the data.

Installation and Downloads

The best way to get pingping is with setuptools or pip. If you already have setuptools, you can install as usual:

python -m pip install pingping

Otherwise download it from PyPi, extract it and run the setup.py script

python setup.py install

If you're Interested in the source, you can always pull from the github repo:

  • From github git clone https://github.com/network-tools/pingping.git

FAQ

  • Question: I want to use pingping with Python3, is that safe?
    Answer: As long as you're using python 3.3 or higher, it's safe. I tested every release against python 3.1+, however python 3.1 and 3.2 not running in continuous integration test.

  • Question: I want to use pingping with Python2, is that safe?
    Answer: As long as you're using python 2.7 or higher, it's safe. I tested against python 2.7.

Other Resources

Bug Tracker and Support

Unit Tests

  • Travis CI project tests pingping on Python versions 2.7 through 3.7.

  • The current build status is:

    Build Status

License and Copyright

  • pingping is licensed MIT 2019

    License: MIT

Author and Thanks

pingping was developed by Kiran Kumar Kotari

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

pingping-1.3.4.tar.gz (6.5 kB view details)

Uploaded Source

File details

Details for the file pingping-1.3.4.tar.gz.

File metadata

  • Download URL: pingping-1.3.4.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

File hashes

Hashes for pingping-1.3.4.tar.gz
Algorithm Hash digest
SHA256 0bdd6bcf7da251a896094705e9260c44993201f3d92bf0cc1f52119751be6ccc
MD5 8232048fd386df23401707cd6c777a4d
BLAKE2b-256 2b68dec2a1c3f974091c6f78d6c5bd1df9c6231c3d6592da086fa998bcd787b1

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