Skip to main content

Project Logo

The Lupaxa SRE Toolbox
Part of The Lupaxa Project


lupaxa-tcp-port-ping

Repeatedly connect to a TCP host and port and report latency.

Features

  • Open one TCP connection, time the handshake, and close it
  • Repeat after a configurable delay (default 1 second)
  • Required host and TCP port, with a 1 second socket timeout by default
  • --count for a finite run; omit it to run until Ctrl-C
  • Summary of total, pass, fail, and failure percentage
  • Library API (probe_tcp_port, run_probes, ProbeResult)
  • Fully typed, linted, formatted, and tested
  • No runtime dependencies beyond the standard library

Installation

From PyPI

pip install lupaxa-tcp-port-ping

From source (development mode)

pip install -e ".[dev]"

Requires Python 3.13+. No runtime dependencies.

Library quick start

from lupaxa.tcp_port_ping import probe_tcp_port, run_probes

one = probe_tcp_port("example.com", 443)
print(one.ok, one.elapsed_ms, one.detail)

summary = run_probes("example.com", 443, count=3, delay=0)
print(summary.total, summary.passed, summary.failed)

CLI quick start

tcp-port-ping --help
tcp-port-ping --server example.com --port 80
tcp-port-ping -s example.com -p 443 -d 1
tcp-port-ping -s 192.0.2.10 -p 22 --count 5 --timeout 0.5

You can also run the CLI as a module:

python -m lupaxa.tcp_port_ping --help
python -m lupaxa.tcp_port_ping --version

Documentation

Online documentation:

Documentation

Source repository:

GitHub

Serve docs locally

From a clone of the repository:

make mkdocs-serve

Then open the local URL printed by MkDocs in your browser.

Development

Clone the repository and install with Make:

make init                # first-time makefile-skills checkout
make python-install-dev  # editable install with [dev]
make python-check        # lint, type-check, and test
The Lupaxa Project Footer

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lupaxa_tcp_port_ping-0.1.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

lupaxa_tcp_port_ping-0.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file lupaxa_tcp_port_ping-0.1.0.tar.gz.

File metadata

  • Download URL: lupaxa_tcp_port_ping-0.1.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for lupaxa_tcp_port_ping-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6e4b1f9738d29ede012ffcce969172dc68c0a530fc191ec070570e12fd35817f
MD5 094cdf9d61ed3e5c3caab3e3de5f79fb
BLAKE2b-256 211f5cad7595e2dac1d70d6227bce87021e6fc87acaaa9e59ffb039dfb38e478

See more details on using hashes here.

Provenance

The following attestation bundles were made for lupaxa_tcp_port_ping-0.1.0.tar.gz:

Publisher: generate-release.yml on lupaxa-sre-toolbox/tcp-port-ping

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lupaxa_tcp_port_ping-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lupaxa_tcp_port_ping-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae8227d16e6227f98f2aa9c5ca0273bb68b2d7552af634ae0089004d672aa419
MD5 890ef6621fd37c6c0043f86c52c11030
BLAKE2b-256 e8d6d6fde88892baf9e0478107c21209175a5f58ad91e66c3a886d9d9aba7c0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for lupaxa_tcp_port_ping-0.1.0-py3-none-any.whl:

Publisher: generate-release.yml on lupaxa-sre-toolbox/tcp-port-ping

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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