Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

https://img.shields.io/pypi/dm/fping.svg https://img.shields.io/pypi/v/fping.svg https://img.shields.io/pypi/status/fping.svg https://img.shields.io/pypi/pyversions/fping.svg https://img.shields.io/pypi/l/fping.svg https://img.shields.io/pypi/format/fping.svg

fping.py

Python library that uses the fping executable as its ping engine.

Requirements

  • Python 2.7 on Linux or Mac OS X (Python 3.5 compatibility is in the works, but not there yet.)

  • netaddr library (e.g. pip install netaddr)

  • Custom, forked build of fping (see Installation).

Installation

This library requires a forked version of fping, that has an added option to output the basic alive, unreachable and unresolvable hosts in CSV format.

  • Go to https://github.com/NetworkEng/fping and follow the installation instructions there to compile and install the custom version. Since you will be downloading the files directly from github, DO NOT skip step 1. Download Link: https://github.com/NetworkEng/fping/archive/develop.tar.gz

  • If you have issues running autogen.sh, please make sure that you have installed the automake package that is appropriate for your Linux distribution.

  • For Mac OS X you will need:

    • Xcode installed from the app store (launch it via gui at least once after install)

    • Xcode command line developer tools via ‘xcode-select –install’

    • Accept the command line license agreement via ‘sudo xcodebuild -license accept’

    • Install homebrew, and then use ‘brew install automake’

Once the fping executable has been compiled and installed, simply use pip to install the fping package from pypi.python.org. e.g.:

pip install fping

Usage

Though this is a work in progress, in its current state, this script is intended to be a library that is called and executed either in the (i)python interpreter / shell, or imported and used by another python script.

Examples:
    >>> from fping import FastPing
    >>> fp = FastPing()
    >>> fp.ping(filename='testing')
    # cmd =  ['/usr/local/sbin/fping', '-nV', '8.8.8.8',
              'www.google.com', '206.190.36.45', 'localhost',
              'host.cannotresolve.com']
    {'host.cannotresolve.com': 'unresolvable',
    'pa-in-f99.1e100.net': 'alive',
    'google-public-dns-a.google.com': 'alive',
    'localhost': 'unreachable',
    'ir1.fp.vip.gq1.yahoo.com': 'alive'}
    >>> fp.hosts(filename='testing', status='alive')
    'pa-in-f99.1e100.net': 'alive',
    'google-public-dns-a.google.com': 'alive',
    'ir1.fp.vip.gq1.yahoo.com': 'alive'}
    >>> fp.alive
    ['pa-in-f99.1e100.net',
    'google-public-dns-a.google.com',
    'ir1.fp.vip.gq1.yahoo.com']
    >>> fp.dead
    ['localhost']
    >>> fp.noip
    ['host.cannotresolve.com']
    >>>

Metadata

Release files for fping 0.0.1a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fping 0.0.1a2
File Size Uploaded
fping-0.0.1a2.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fping 0.0.1a2
File Interpreter ABI Platform
fping-0.0.1a2-py2-none-any.whl Python 2 none any Details

Total release size: 14.4 kB

Release files / fping-0.0.1a2.tar.gz

Download URL fping-0.0.1a2.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7dbd3cf7f3f0cd3f2ea776bcdad7d1403112a5e746bc03bf0df8c1301ffc49cd
BLAKE2b-256 checksum
How to use checksums
66a044694e3c4e20df4bcd520df87faade3d043cfb2aa8853d2fbbef3b379c2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / fping-0.0.1a2-py2-none-any.whl

Download URL fping-0.0.1a2-py2-none-any.whl
Size 7.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
4f2a905a68df06c89f932e0b59011f1fd9614de470ffc141d9188a5be96268ef
BLAKE2b-256 checksum
How to use checksums
96f9793d36fbe45bb54dfa05953fdda3c7fac9a66e05a764a52d57584529891a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.1a2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page