{"id":14974186,"url":"https://github.com/vitalk/flask-humanize","last_synced_at":"2025-10-27T06:31:58.889Z","repository":{"id":44884089,"uuid":"45099521","full_name":"vitalk/flask-humanize","owner":"vitalk","description":"Common humanization utilities for Flask applications","archived":false,"fork":false,"pushed_at":"2022-01-20T16:08:20.000Z","size":25,"stargazers_count":29,"open_issues_count":4,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-01T03:22:15.455Z","etag":null,"topics":["flask","i18n"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/Flask-Humanize","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitalk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-28T08:44:25.000Z","updated_at":"2024-04-12T18:55:36.000Z","dependencies_parsed_at":"2022-07-21T15:36:45.524Z","dependency_job_id":null,"html_url":"https://github.com/vitalk/flask-humanize","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalk%2Fflask-humanize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalk%2Fflask-humanize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalk%2Fflask-humanize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalk%2Fflask-humanize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitalk","download_url":"https://codeload.github.com/vitalk/flask-humanize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238455091,"owners_count":19475376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","i18n"],"created_at":"2024-09-24T13:50:07.500Z","updated_at":"2025-10-27T06:31:58.528Z","avatar_url":"https://github.com/vitalk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask Humanize\n\nProvides an interface between [Flask](http://flask.pocoo.org/) web framework\nand [humanize](https://github.com/jmoiron/humanize) library.\n\n## Features\n\n- Add new filter `humanize` to jinja environment, which can be easily used for\n  humanize different objects:\n\n    + Integer numbers:\n\n      ```jinja\n      {{ 12345|humanize('intcomma') }} -\u003e 12,345\n      {{ 12345591313|humanize('intword') }} -\u003e 12.3 billion\n      {{ 5|humanize('apnumber') }} -\u003e five\n      ```\n\n    + Floating point numbers:\n\n      ```jinja\n      {{ 0.3|humanize('fractional') }} -\u003e 1/3\n      {{ 1.5|humanize('fractional') }} -\u003e 1 1/2\n      ```\n\n    + File sizes:\n\n      ```jinja\n      {{ 1000000|humanize('naturalsize') }} -\u003e 1.0 MB\n      {{ 1000000|humanize('naturalsize', binary=True) }} -\u003e 976.6 KiB\n      ```\n\n    + Date \u0026 times:\n\n      ```jinja\n      {{ datetime.datetime.now()|humanize('naturalday') }} -\u003e today\n      {{ datetime.date(2014,4,21)|humanize('naturaldate') }} -\u003e Apr 21 2014\n      {{ (datetime.datetime.now() - datetime.timedelta(hours=1))|humanize() }} -\u003e an hour ago\n      ```\n\n- Runtime i18n/l10n\n\n    ```python\n    from flask import Flask\n    from flask_humanize import Humanize\n    \n    app = Flask(__name__)\n    humanize = Humanize(app)\n    \n    @humanize.localeselector\n    def get_locale():\n        return 'ru_RU'\n    ```\n\n    ```jinja\n    {{ datetime.datetime.now()|humanize }} -\u003e сейчас\n    ```\n\n- In order to use UTC time instead of local time for humanize date and time\n  methods use `HUMANIZE_USE_UTC` option, which is disabled by default:\n\n    ```python\n    HUMANIZE_USE_UTC = True\n    ```\n\n## Issues\n\nDon't hesitate to open [GitHub Issues](https://github.com/vitalk/flask-humanize/issues) for any bug or suggestions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitalk%2Fflask-humanize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitalk%2Fflask-humanize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitalk%2Fflask-humanize/lists"}