Skip to main content

SRE Toolbox

Time to First Byte

Measure HTTP time to first byte and repeat until interrupted.

Install

pip install lupaxa-time-to-first-byte
time-to-first-byte --help

CLI

time-to-first-byte --url https://example.com --count 5
ttfb -u https://example.com --delay 1 --timeout 5
python -m lupaxa.time_to_first_byte --version

The tool resolves the host, connects, negotiates TLS for HTTPS, sends an HTTP request, and measures the time until the first response byte. It follows up to 10 redirects by default and repeats every second until Ctrl-C unless --count is set.

Library

from lupaxa.time_to_first_byte import measure, run_measurements

one = measure("https://example.com", timeout=5.0)
print(one.ok, one.status, one.ttfb_ms)

summary = run_measurements("https://example.com", count=3, delay=0)
print(summary.total, summary.passed, summary.failed)

Development

make init
make python-install-dev
make python-check
make mkdocs-serve

Documentation

The published guide is at https://time-to-first-byte.thelupaxaproject.org/.

Site Markdown lives in mkdocs/.

The Lupaxa Project Footer

Release files for lupaxa-time-to-first-byte 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lupaxa-time-to-first-byte 0.1.2
File Size Uploaded
lupaxa_time_to_first_byte-0.1.2.tar.gz 8.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lupaxa-time-to-first-byte 0.1.2
File Interpreter ABI Platform
lupaxa_time_to_first_byte-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.2 kB

Release files / lupaxa_time_to_first_byte-0.1.2.tar.gz

Download URL lupaxa_time_to_first_byte-0.1.2.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a9eb684b3eff337998c73d427e2c6875954c155622865816e4836631fae49a9b
BLAKE2b-256 checksum
How to use checksums
f67e856425a0946dbcef1a892f88cbc2a220f5e74e4d43859a160dc3e0722da3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / lupaxa_time_to_first_byte-0.1.2-py3-none-any.whl

Download URL lupaxa_time_to_first_byte-0.1.2-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55bf65997f5045c474f51cb4e2b639480dac07478e6b5e757f55be988f618954
BLAKE2b-256 checksum
How to use checksums
6c47fcf10edc1179a28544705da88f2247154750bd2c1fe42a45d90bc11e3656
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release 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