r/Python • • 25d ago

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

32 Upvotes

176 comments sorted by

View all comments

1

u/AleDev99 5d ago

pulseping-lite: uptime + TLS certificate expiry check for one URL or host:port, in one Python file

What My Project Does Checks one target per run: HTTP(S) status for a URL, or a plain TCP connect for host:port (add --tls to read the certificate there too). It reports latency and how many days the TLS certificate has left, and fails if it expires sooner than --warn-days (default 14). Exit codes 0/1/2 so cron or CI can act on the result, plus --json output. Stdlib only, Python 3.9+, no config and no state.

pip install pulseping-lite
pulseping-lite https://example.com --warn-days 14

Target Audience People who want a quick "is it up and is the cert about to expire" check from a cron job, a CI step or a deploy script, without running a monitoring server. Homelab, small services, internal endpoints.

Comparison Uptime Kuma or a hosted monitor gives you dashboards, history and alerting; if you want that, use them. curl + openssl s_client can do the same checks but the date parsing gets fiddly in shell. This sits in between: one command, clean exit codes, JSON. Limitations: one target per run, no dashboard, no history, no built-in alerts (you pipe the exit code into whatever notifies you), and --insecure can't always report expiry.

https://github.com/alessio1999xx-debug/pulseping-lite (I maintain it, MIT). feedback on the flags or output format welcome.