ping library
Project description
🔔 Welcome to yaping
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]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
yaping-0.1.0-py3-none-any.whl
(38.8 kB
view details)
File details
Details for the file yaping-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: yaping-0.1.0-py3-none-any.whl
- Upload date:
- Size: 38.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4319133551dae08991b306d901944cba9da536ff3b46b88cdc749650580394d7 |
|
MD5 | e64a6bc2fc0ae42aa4abb65410b8da87 |
|
BLAKE2b-256 | 60e31f53e1eb66c2a1dd58dc5dba88e8d99adbe82aa4925c1fc1bcf543ba76d3 |