skillfed

human-readable

Human Readable

human-readable v2.0.3 150.2K downloads/30d#10,974 on PyPI41
Permissive license MIT Active released

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

uv

uv add human-readable

poetry

poetry add human-readable

Installing 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

Development Status :: 5 - Production/StableProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

humanize numbers and datesfile size formattingtime delta to readable textlocalized number formattinghuman readable time stringslist formatting and joiningscientific notation displayfractional number display
i18nformattingtext-processing

More Utilities packages