OofChair / simple-ping

Python ping package published in PyPi

Home Page:https://pypi.org/project/simple-ping/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simple-ping

Simple Python ping package used if from ping import Ping does not work.

 
 

README Map

  • To pip install, run: pip install git+https://github.com/OofChair/simple-ping
  • To run locally, go to Run from command line.
  • To use the main class, skip to The main class.
  • Instructions on advanced/technical documentation, go to Documentation.

Run from command line

From the project's root directory, please run the following command and follow instructions:

$ python -m ping

The main class

With the python console and the Ping class, we can get things running:

$ python
>>> from simple_ping import Ping
>>> ping = Ping('localhost')
>>> print(f'Ping avg return: {ping.avg} ms')
>>> print(f'Ping errors return: {ping.returncode} {ping.stderr}')

Documentation

Please try from python console:

$ python
>>> import simple_ping
>>> help(simple_ping)

Or try from command line:

$ python -c "import simple_ping; print(simple_ping.__doc__)"

All documentation can be found in docs.

About

Python ping package published in PyPi

https://pypi.org/project/simple-ping/

License:MIT License


Languages

Language:Python 100.0%