about-time
Easily measure timing and throughput of code blocks, with beautiful human friendly representations.
What it is and what it does
about-time is a lightweight timing and throughput measurement utility that wraps code blocks, functions, and iterables to extract execution duration and iteration counts, then formats them into human-readable strings. It operates in three modes: as a context manager for arbitrary code blocks, as a wrapper for callables with optional arguments, and as an iterable wrapper that counts elements and calculates throughput while you iterate.
The package's main value is in its formatting layer—it converts raw nanosecond-to-hour durations into clean representations, applies SI or IEC scaling to element counts, and expresses throughput in human-friendly units. It has no runtime dependencies and supports Python 3.8 through 3.14.
Use it for:
- Instrument performance-critical loops to log throughput in real time without polluting the loop code itself.
- Measure and compare execution times of alternative implementations in a notebook or REPL with clean, readable output.
- Track generator or iterator performance by wrapping it and accessing count and throughput metrics after iteration completes.
- Add timing annotations to function calls in a single line, capturing both duration and return value for logging or debugging.
- Monitor code block durations in production logs with human-friendly formatting that survives log aggregation systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Measures execution time and throughput of code blocks, generators, and callables, rendering results in human-readable formats like milliseconds, SI-prefixed counts, and operations per second.
Yes. The package solves a real friction point—converting raw timing data into human-readable form—with zero dependencies, stable API, and broad Python version support. Use it when you need clean, readable timing instrumentation without the overhead of a full profiler. The aging maintenance status is not a blocker; the package is marked Production/Stable and has received regular updates.
Install
about-time on PyPI
pip
pip install about-timeuv
uv add about-timepoetry
poetry add about-timeInstalling about-time
Before you install
Low friction: pure Python wheel with no runtime dependencies. Last commit 2025-07-28 and status marked as aging, but the package is marked Production/Stable and has received regular maintenance since its 2018-08-21 initial release.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
from about_time import about_time
with about_time() as t:
expensive_operation()
print(f'Duration: {t.duration_human}')
# Or with a callable:
t = about_time(some_func)
print(f'Result: {t.result}, took {t.duration_human}')
# Or with an iterable:
t = about_time(range(1000))
for item in t:
process(item)
print(f'Throughput: {t.throughput_human}')
Verify before relying
- Whether the aging maintenance status reflects active development pauses or stable-state maintenance only.
- Real-world accuracy of throughput measurements compared to dedicated profiling tools.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 387 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,841,457/month — #2,482 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: about_time-4.2.2-py3-none-any.whl
Keywords: track, tracker, time, code, blocks, monitor, statistics, analytics
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
stopwatch.pyProvides a simple stopwatch timer that measures…
permissive · top 15,000 on PyPI
deltaParses human-readable duration strings like '1…
permissive · top 15,000 on PyPI
humanreadableParses human-readable time and bitrate strings…
permissive · top 15,000 on PyPI
alive-progressDisplays an animated progress bar in the…
permissive · top 5,000 on PyPI
pytimeparseParses human-readable time expressions (like…
permissive · top 1,000 on PyPI
hurry.filesizeConverts byte counts into human-readable file…
unclear · top 15,000 on PyPI
humanfriendlyFormats and parses numbers, file sizes,…
permissive · top 1,000 on PyPI
pytest-durationsA pytest plugin that measures and reports…
permissive · top 5,000 on PyPI
agoConverts datetime, timedelta, and timestamp…
permissive · top 15,000 on PyPI
pytimeparse2Parses human-readable time expressions (like…
permissive · top 5,000 on PyPI