Getting started
Requirements
- Python 3.13 or newer
- A host and TCP port you are allowed to probe
- No runtime dependencies beyond the standard library
Install
Library import:
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)
Module entry point:
From source (development)
First run
Pass the host and port:
Each successful connect prints the host, port, sequence, and time in
milliseconds. Timeouts print Connection timed out!. A refused port
prints Port is closed!!!. Ctrl-C (or the end of --count) prints
the totals. A finished --count run exits 0 when every probe
succeeded and 1 when any failed. Ctrl-C prints the summary
immediately and exits 0.