{"categories":[{"label":"Text Processing","url":"https://skillfed.io/packages/category/text-processing"}],"enrichment":{"capability":"Adds humanize library filters to Jinja2 templates, enabling human-readable formatting of numbers, dates, times, and file sizes directly in template expressions.","skillfed_tags":["jinja2-extension","template-filters","number-formatting"],"use_cases":["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."],"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.\n\nThe extension is lightweight\u2014just two dependencies\u2014and 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.","worth_installing":"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\u2014especially useful for web applications and report generation where template-level control over number and date presentation matters."},"id":"jinja2-humanize-extension","links":{"html":"https://skillfed.io/packages/jinja2-humanize-extension","md":"https://skillfed.io/packages/jinja2-humanize-extension.md","pypi":"https://pypi.org/project/jinja2-humanize-extension/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2023-09-01","license_spdx":null,"license_treatment":"permissive","name":"jinja2-humanize-extension","python_support":"supports_current","summary":"a jinja2 extension to use humanize library inside jinja2 templates"},"popularity":{"monthly_downloads":6365322,"position":1921,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.4.0"}
