jinja2-humanize-extension
a jinja2 extension to use humanize library inside jinja2 templates
Decision gist · record as of 2026-08-14
Yes. Low install friction, no known vulnerabilities, permissive license, and active maintenance make it safe. Install if you use Jinja2 templates and want to apply humanize formatting directly in templates rather than preprocessing values in Python—especially useful for web applications and report generation where template-level control over number and date presentation matters.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with only two runtime dependencies (jinja2 and humanize).
- Marked Production/Stable with active maintenance; last commit 2026-07-08.
License · maintenance · safety
BSD (permissive) — BSD permissive license allows commercial and private use with minimal restrictions.
last release 2023-09-01 (1078 days) · last repo commit 2026-07-08 · 6 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,365,322 downloads/mo, #1,921 on PyPI
Alternatives
Verify before relying
from jinja2 import Environment
from jinja2_humanize_extension import HumanizeExtension
env = Environment(extensions=[HumanizeExtension])
template = env.from_string("{{ 30000000|humanize_naturalsize() }}")
print(template.render())- Whether all humanize functions remain compatible with humanize >= 4.0 beyond the two explicitly deprecated functions noted in the description.
- Performance characteristics when rendering templates with many humanize filters on large datasets.
- Exact output format for ordinal numbers and other functions across different locales.
What it is and what it does
This package bridges Jinja2 templating and the humanize library by exposing humanize's formatting functions as Jinja2 filters. Instead of calling humanize functions in Python code before rendering, you can apply them directly in templates using a filter syntax like `{{ value|humanize_naturalsize() }}`. It currently maps functions for file sizes, dates, times, numbers, and localization settings.
The extension is lightweight—just two dependencies—and works with current Python versions. It's marked stable and actively maintained, though two functions (abs_timedelta and date_and_delta) are retained for compatibility despite being deprecated in humanize >= 4.0. Use it when you want template-level control over human-readable output formatting without pre-processing values in your application code.
Use it for
- Format file sizes in web templates: {{ file.bytes|humanize_naturalsize() }} renders as '30.0 MB'.
- Display relative dates and times in UI: {{ event.timestamp|humanize_naturaltime() }} shows relative time.
- Localize number formatting in multilingual templates using humanize_thousands_separator() and humanize_decimal_separator().
- Render ordinal numbers in templates: {{ rank|humanize_ordinal() }} produces ordinal forms.
- Apply scientific or metric notation to large numbers directly in Jinja2 without backend logic.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, no known vulnerabilities, permissive license, and active maintenance make it safe. Install if you use Jinja2 templates and want to apply humanize formatting directly in templates rather than preprocessing values in Python—especially useful for web applications and report generation where template-level control over number and date presentation matters.
Install
jinja2-humanize-extension on PyPI
Before you install
Low friction: pure Python wheel with only two runtime dependencies (jinja2 and humanize). Marked Production/Stable with active maintenance; last commit 2026-07-08.
License in practice
BSD permissive license allows commercial and private use with minimal restrictions.
Quickstart
from jinja2 import Environment
from jinja2_humanize_extension import HumanizeExtension
env = Environment(extensions=[HumanizeExtension])
template = env.from_string("{{ 30000000|humanize_naturalsize() }}")
print(template.render())
Verify before relying
- Whether all humanize functions remain compatible with humanize >= 4.0 beyond the two explicitly deprecated functions noted in the description.
- Performance characteristics when rendering templates with many humanize filters on large datasets.
- Exact output format for ordinal numbers and other functions across different locales.
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release >=3.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesjinja2humanize |
| Maintenance | Actively maintained 1,078 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,365,322 / month, #1,921 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3 |
Evidence: jinja2_humanize_extension-0.4.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “jinja2 humanize filters”
- jinja2-humanize-extensionAdds humanize library filters to Jinja2 templates, enabling…
- jinja2-ansible-filtersProvides a collection of Jinja2 template filters ported from Ansible,…
- jinja2-strcaseAdds string-case conversion filters to Jinja2 templates, enabling…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also Flask-Moment · jinja2-time · jinja2-ansible-filters · jinja2-strcase · humanize · jinjanator-plugins · jinja2_pluralize · Jinja2 · jinja2-cli · reuters-style