Skip to main content

Project Logo

The Lupaxa SRE Toolbox
Part of The Lupaxa Project


lupaxa-time-to-first-byte

Measure HTTP time to first byte and repeat until interrupted.

Features

  • Measure DNS, connection, TLS, and total time to first byte
  • Follow redirects and report the final response status
  • Repeat after a configurable delay (default 1 second)
  • Use a 5 second socket timeout and follow up to 10 redirects by default
  • Run a fixed --count or continue until Ctrl-C
  • Treat any HTTP response with a first byte, including 4xx and 5xx, as a pass
  • Use the measure and run_measurements library API
  • Run with no dependencies beyond the Python standard library

Installation

From PyPI

pip install lupaxa-time-to-first-byte

From source (development mode)

pip install -e ".[dev]"

Requires Python 3.13+. No runtime dependencies.

Library quick start

from lupaxa.time_to_first_byte import measure, run_measurements

one = measure("https://example.com")
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)

CLI quick start

time-to-first-byte --help
time-to-first-byte --url https://example.com
ttfb -u https://example.com --count 5
ttfb -u https://example.com --delay 0 --timeout 5 --max-redirects 10

You can also run the CLI as a module:

python -m lupaxa.time_to_first_byte --help
python -m lupaxa.time_to_first_byte --version

Options

  • --url, -u: required HTTP or HTTPS URL
  • --delay, -d: seconds between samples; default 1
  • --count, -c: number of samples; omitted means run until Ctrl-C
  • --timeout, -T: socket timeout in seconds; default 5
  • --max-redirects: maximum redirects to follow; default 10
  • --version: print the package version

Documentation

Online documentation:

Documentation

Source repository:

GitHub

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
The Lupaxa Project Footer

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

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.0
File Size Uploaded
lupaxa_time_to_first_byte-0.1.0.tar.gz 9.5 kB Details

Built distribution (wheel)

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

Total release size: 20.5 kB

Release files / lupaxa_time_to_first_byte-0.1.0.tar.gz

Download URL lupaxa_time_to_first_byte-0.1.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
af7484c6e0959658a705cbd80d73c345a8ce25a1176b219e103f9fc6a0c2926b
BLAKE2b-256 checksum
How to use checksums
212e0dd17b2831dd848d4877529b4793e1f5047c8a3eb09924ccc98d1ccc352c
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 22, 2026.

Transparency log

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

Download URL lupaxa_time_to_first_byte-0.1.0-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6c6dafaa716e5d9d03db3a8ea4aa0b1c3f48d25e98e36da568a9bd4c43383d2
BLAKE2b-256 checksum
How to use checksums
64b19d24bfbff2a5319ae041584793de51fa11375e063462433890ed082ac3de
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 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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