Flask-Moment
Formatting of dates and times in Flask templates using moment.js.
Decision gist · record as of 2026-08-14
Yes. Flask-Moment is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a common Flask templating need cleanly. The MIT license poses no restrictions. Install it if you need flexible date and time rendering in your Flask templates.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later; moment.js must be loaded in your HTML template separately.
- Low friction install with only Flask and packaging as runtime dependencies.
- Actively maintained with recent commits and stable since initial release.
License · maintenance · safety
permissive license (permissive) — MIT license is permissive; you can use this in commercial and private projects with minimal restrictions.
last release 2024-05-28 (808 days) · last repo commit 2026-05-14 · 380 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 147,069 downloads/mo, #11,081 on PyPI
Alternatives
Verify before relying
pip install Flask-Moment
from flask import Flask
from flask_moment import Moment
app = Flask(__name__)
moment = Moment(app)- Whether moment.js is bundled or must be loaded separately in templates
- Supported moment.js versions and any version compatibility constraints
- Performance implications of rendering large numbers of timestamps
What it is and what it does
Flask-Moment is a Flask extension that integrates moment.js into your Jinja2 templates, allowing you to format dates and times directly in template markup. Instead of formatting timestamps in Python and passing strings to templates, you pass datetime objects and use Flask-Moment's template functions to render them as human-readable text—relative times like 'a few seconds ago', formatted dates, durations, and more—all processed by moment.js in the browser.
The package depends on Flask and packaging, and requires Python 3.6 or later. It's designed for web applications where you want flexible, locale-aware date and time display without server-side formatting overhead. The extension integrates into your template layer, making it straightforward to add moment.js capabilities to existing Flask projects.
Use it for
- Display relative timestamps in activity feeds or comment sections without server-side recalculation.
- Render dates and times in user-preferred formats and locales directly in templates.
- Show countdown timers or duration displays that update in the browser using moment.js.
- Format timestamps in API responses for display in Flask-rendered HTML without extra logic.
- Build dashboards where timestamps need to update client-side as time passes.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Flask-Moment is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a common Flask templating need cleanly. The MIT license poses no restrictions. Install it if you need flexible date and time rendering in your Flask templates.
Install
flask-moment on PyPI
Before you install
Low friction install with only Flask and packaging as runtime dependencies. Actively maintained with recent commits and stable since initial release.
Requires Python 3.6 or later; moment.js must be loaded in your HTML template separately.
License in practice
MIT license is permissive; you can use this in commercial and private projects with minimal restrictions.
Quickstart
pip install Flask-Moment
from flask import Flask
from flask_moment import Moment
app = Flask(__name__)
moment = Moment(app)
Verify before relying
- Whether moment.js is bundled or must be loaded separately in templates
- Supported moment.js versions and any version compatibility constraints
- Performance implications of rendering large numbers of timestamps
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesFlaskpackaging |
| Maintenance | Actively maintained 808 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 147,069 / month, #11,081 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: Flask_Moment-1.0.6-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 › “flask template date formatting”
- Flask-MomentFlask-Moment adds moment.js date and time formatting to Jinja2…
- jinja2-timeJinja2 extension that adds template tags for working with dates and…
- flask-babelAdds internationalization (i18n) and localization (l10n) support to…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also jinja2-humanize-extension · moment · jinja2-time · jinja_partials · ago · jinja2-fragments · aiohttp-jinja2 · ruamel.yaml.jinja2 · pytimeparse2