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
--countfor 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:
Source repository:
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e4b1f9738d29ede012ffcce969172dc68c0a530fc191ec070570e12fd35817f
|
|
| MD5 |
094cdf9d61ed3e5c3caab3e3de5f79fb
|
|
| BLAKE2b-256 |
211f5cad7595e2dac1d70d6227bce87021e6fc87acaaa9e59ffb039dfb38e478
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lupaxa_tcp_port_ping-0.1.0.tar.gz -
Subject digest:
6e4b1f9738d29ede012ffcce969172dc68c0a530fc191ec070570e12fd35817f - Sigstore transparency entry: 2782373715
- Sigstore integration time:
-
Permalink:
lupaxa-sre-toolbox/tcp-port-ping@7364f5b4f6044bb75a9b7815e2e3d8d3e13b4c26 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/lupaxa-sre-toolbox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
generate-release.yml@7364f5b4f6044bb75a9b7815e2e3d8d3e13b4c26 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lupaxa_tcp_port_ping-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lupaxa_tcp_port_ping-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae8227d16e6227f98f2aa9c5ca0273bb68b2d7552af634ae0089004d672aa419
|
|
| MD5 |
890ef6621fd37c6c0043f86c52c11030
|
|
| BLAKE2b-256 |
e8d6d6fde88892baf9e0478107c21209175a5f58ad91e66c3a886d9d9aba7c0a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lupaxa_tcp_port_ping-0.1.0-py3-none-any.whl -
Subject digest:
ae8227d16e6227f98f2aa9c5ca0273bb68b2d7552af634ae0089004d672aa419 - Sigstore transparency entry: 2782374893
- Sigstore integration time:
-
Permalink:
lupaxa-sre-toolbox/tcp-port-ping@7364f5b4f6044bb75a9b7815e2e3d8d3e13b4c26 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/lupaxa-sre-toolbox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
generate-release.yml@7364f5b4f6044bb75a9b7815e2e3d8d3e13b4c26 -
Trigger Event:
push
-
Statement type: