Skip to main content

ping library

Project description

🔔 Welcome to yaping

yaping Python Versions License CI

A python library for pinging multiple hosts.

It focuses on providing both sync and asynch versions and minimizing the amount of of OS resources (only a single socket is used for handling multiple hosts with multiple ping requests)

Without further ado:

$ python -m asyncio
>>> from yaping.aioping import ping
>>> from yaping.tools import response_text

>>> async for response in ping(["gnu.org", "orcid.org"], count=2):
...    text = response_text(response)
...    print(text)
64 bytes from orcid.org (104.20.228.70): icmp_seq=1 time=4.8ms
64 bytes from gnu.org (209.51.188.116): icmp_seq=1 time=113.4ms
64 bytes from orcid.org (104.20.228.70): icmp_seq=2 time=4.7ms
64 bytes from gnu.org (209.51.188.116): icmp_seq=2 time=118.8ms

Requirements:

  • python >= 3.9

Installation

From within your favorite python environment:

$ pip install yaping

To develop, run tests, build package, lint, etc you'll need:

$ pip install yaping[dev]

To run docs you'll need:

$ pip install yaping[docs]

Setup

Some systems require this adjustment to be able to create datagram icmp sockets:

sudo sysctl -w net.ipv4.ping_group_range="0 2147483647"

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

yaping-0.2.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yaping-0.2.0-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file yaping-0.2.0.tar.gz.

File metadata

  • Download URL: yaping-0.2.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for yaping-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f5f7319e253411658de3927cf3d4e4bae5aa9d3231e1cb01c60f74538b75b8c4
MD5 e26808e8ed897bec8def31647a6f811d
BLAKE2b-256 208be5ec6f09ad3093f10f4d2c49fc845ada81e6bc1237017ea1a1d20d75d101

See more details on using hashes here.

File details

Details for the file yaping-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: yaping-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 26.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for yaping-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 214185e56e076cf232628068a4bbc7b6ef7cf31df1cb1f0e37d09bac4c881401
MD5 36dc2c65f49f73ec79e9e0c77f58bc94
BLAKE2b-256 3822c638bce0ce0cc29b055d8c30d3f4dcef9c3cc126fe2b9c47258e2873a165

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page