skillfed

about-time

Easily measure timing and throughput of code blocks, with beautiful human friendly representations.

about-time v4.2.2 3.8M downloads/30d#2,482 on PyPI69
Permissive license MIT AGING released

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-time

uv

uv add about-time

poetry

poetry add about-time

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: User InterfacesTopic :: Utilities

Tags

measure code execution timetiming profiler context managerthroughput counter generatorhuman readable duration formattingcode block performance trackerSI prefix formattingloop iteration counter
profilinginstrumentationperformance-monitoring

More Utilities packages