human-readable
Human Readable
What it is and what it does
Human Readable is a pure-Python library that converts common data types—numbers, dates, times, file sizes, and lists—into natural language strings. It handles both simple formatting (e.g., "1.0 MB" for file sizes, "12,345" for comma-separated integers) and more complex conversions (e.g., "2 months" from a timedelta, "123.5 million" from large numbers). The library includes precise time-delta formatting with configurable units and suppression, scientific notation display, and fractional number representation.
The package supports internationalization across 20+ locales, allowing you to activate different language translations at runtime. It also provides a special abbreviated English locale (en_ABBR) that renders compact output like "3s" instead of "3 seconds ago". With no external runtime dependencies, it installs cleanly and works on Python 3.9 and later. The codebase is actively maintained and marked production-stable.
Use it for:
- Display file sizes in user-facing interfaces (e.g., "976.6 KiB" for binary or "976.6K" for GNU format).
- Show relative time in logs or dashboards (e.g., "2 minutes ago" or "one minute to seven hours").
- Format large numbers for reports or analytics (e.g., "12.3 billion" instead of 12345591313).
- Localize date/time/number output for international applications using 20+ supported locales.
- Join lists with custom separators and conjunctions (e.g., "Alpha; Bravo or Charlie").
- Render precise time intervals with microsecond-level detail and suppression of unwanted units.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts numbers, dates, times, file sizes, and lists into human-readable strings with support for 20+ locales including English, Portuguese, French, German, Spanish, Chinese, Japanese, and others.
Yes. This is a lightweight, dependency-free utility with active maintenance, production-stable status, no known vulnerabilities, and a permissive MIT license. Install it if you need to display numbers, dates, times, or file sizes in human-friendly formats, especially if you need multi-locale support. The low friction and broad feature set make it a practical choice for user-facing output.
Install
human-readable on PyPI
pip
pip install human-readableuv
uv add human-readablepoetry
poetry add human-readableInstalling human-readable
Before you install
Low friction: pure Python wheel with no runtime dependencies. Active maintenance with last commit on 2026-08-03 and production-stable status. Supports Python 3.9 through 3.13.
License in practice
MIT license (permissive): you can use this freely in commercial and private projects with minimal restrictions—just include the license notice.
Quickstart
pip install human-readable
import human_readable
import datetime as dt
# Time delta
print(human_readable.time_delta(dt.timedelta(days=65)))
# Output: "2 months"
# File size
print(human_readable.file_size(1000000))
# Output: "1.0 MB"
# Numbers
print(human_readable.int_word(123455913))
# Output: "123.5 million"
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 112 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 150,180/month — #10,974 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: human_readable-2.0.3-py3-none-any.whl
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
humanizeConverts numbers, dates, times, and file sizes…
permissive · top 1,000 on PyPI
reuters-styleFormats dates, numbers, and text according to…
permissive · top 15,000 on PyPI
agoConverts datetime, timedelta, and timestamp…
permissive · top 15,000 on PyPI
humanreadableParses human-readable time and bitrate strings…
permissive · top 15,000 on PyPI
timeagoFormats datetime objects and timedeltas into…
permissive · top 5,000 on PyPI
deltaParses human-readable duration strings like '1…
permissive · top 15,000 on PyPI
pytimeparseParses human-readable time expressions (like…
permissive · top 1,000 on PyPI
pytimeparse2Parses human-readable time expressions (like…
permissive · top 5,000 on PyPI
numerizeConverts large numbers into human-readable…
permissive · top 15,000 on PyPI
srtParse, modify, and compose SRT subtitle files…
permissive · top 15,000 on PyPI