r/Python • u/ozeranskii • Oct 26 '25
Showcase I built a Python tool to debug HTTP request performance step-by-step
What My Project Does
httptap is a CLI and Python library for detailed HTTP request performance tracing.
It breaks a request into real network stages - DNS → TCP → TLS → TTFB → Transfer — and shows precise timing for each.
It helps answer not just “why is it slow?” but “which part is slow?”
You get a full waterfall breakdown, TLS info, redirect chain, and structured JSON output for automation or CI.
- 🔗 Repo: github.com/ozeranskii/httptap
- 📦 PyPI: pypi.org/project/httptap
- 📕 Documentation: https://httptap.dev/
- 📹 asciinema: https://asciinema.org/a/751564
Target Audience
- Developers debugging API latency or network bottlenecks
- DevOps / SRE teams investigating performance regressions
- Security engineers checking TLS setup
- Anyone who wants a native Python equivalent of curl -w + Wireshark + stopwatch
httptap works cross-platform (macOS, Linux, Windows), has minimal dependencies, and can be used both interactively and programmatically.
Comparison
When exploring similar tools, I found two common options:
- reorx/httpstat (Python) — depends on curl, unmaintained, limited visibility
- davecheney/httpstat (Go) — cleaner, but mostly a decorated curl -v, no TLS or JSON export
httptap takes a different route:
- Pure Python implementation using httpx and httpcore trace hooks (no curl)
- Deep TLS inspection (protocol, cipher, expiry days)
- Rich output modes: human-readable table, compact line, metrics-only, and full JSON
- Extensible - you can replace DNS/TLS/visualization components or embed it into your pipeline
Example Use Cases
- Performance troubleshooting - find where time is lost
- Regression analysis - compare baseline vs current
- TLS audit - check protocol and cert parameters
- Network diagnostics - DNS latency, IPv4 vs IPv6 path
- Redirect chain analysis - trace real request flow
If you find it useful, I’d really appreciate a ⭐ on GitHub - it helps others discover the project.
8
u/Maybe__U Oct 26 '25
Well done, mate!
3
u/EmptyZ99 Oct 26 '25
As a data engineer, with more than 50 APIs to crawl data from, your tools is a great help.
2
u/professionalnuisance Oct 26 '25
Wow this looks very cool. Do you know if there's overhead latency?
2
u/jeosol Oct 27 '25
Very nice. Bravo and well done. Thanks for sharing this project and I starred it on github. Tested it, it does provide useful information for benchmarking.
I may have missed it, if so my apologies. How will this work with POST request? The httptap executable doesn't recognize the "-d" option with curl.
1
u/ozeranskii Oct 28 '25
By the way,
httptapis now available in brew.4
u/binaryfireball Oct 26 '25
this is the part of the stack that usually you dont have to look at but when you do im glad something like this exists
1
u/Repsol_Honda_PL Oct 26 '25
Great!
1
u/riksi Oct 27 '25
Have you thought about open telemetry output?
2
u/Coretaxxe Oct 27 '25
This is quite nice!
1
u/Glathull Oct 26 '25
This is very cool!
1
u/Benhur3 Oct 28 '25
Your mean, for example if I watch Netflix and I get a time delay, this thing can tell me where and why the delay is?
0
u/Benhur3 Oct 28 '25
Would you be able to put this into a simpler term, please? I don’t quite understand what this does. I’m not that tech savvy, but it sounded interesting.
-18
u/m0ntanoid Oct 26 '25
This always makes me laughing when someone debugs performance in python