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.1

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

Built distribution (wheel)

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

Total release size: 20.5 kB

Release files / lupaxa_time_to_first_byte-0.1.1.tar.gz

Download URL lupaxa_time_to_first_byte-0.1.1.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3618b7f5598ea8f125a4a9c99c03d902029a23346690e9d6b7d228caf9031f75
BLAKE2b-256 checksum
How to use checksums
58a7f8f56c47634db81d8cca3edf69b721793e902e264cf09cf125c764f808ba
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 23, 2026.

Transparency log

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

Download URL lupaxa_time_to_first_byte-0.1.1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8d54bf6c9b16731a4bc48361ba6d2027a922735c653a993a98f6ada77d5259e
BLAKE2b-256 checksum
How to use checksums
42d98339f364ee26d1f9f634b0a568b76413e9cd5436a25b5149e65b56a50595
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 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

This release

0.1.1 This release

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