--- id: about-time version: "4.2.2" license: MIT license_treatment: permissive maintenance: aging --- # about-time — Easily measure timing and throughput of code blocks, with beautiful human friendly representations. License: permissive · Maintenance: aging · Downloads: 3.8M/mo ## 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 above — 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 pip install about-time uv add about-time 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_current - Install friction: low - Maintenance: aging - Downloads: 3.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags measure code execution time, timing profiler context manager, throughput counter generator, human readable duration formatting, code block performance tracker, SI prefix formatting, loop iteration counter, profiling, instrumentation, performance-monitoring [View on SkillFed](https://skillfed.io/packages/about-time) · [View on PyPI](https://pypi.org/project/about-time/)