Flask-Minify
Flask extension to minify html, css, js and less.
Decision gist · record as of 2026-08-14
Yes. Flask-Minify is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem for Flask applications seeking to reduce response size. The MIT license is permissive. Install it if you want automatic minification of HTML, CSS, and JavaScript responses without manual configuration; the decorator and bypass options give you control when you need it.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction install with a pure-Python default setup.
- Active maintenance with recent releases; last commit 2026-04-13.
- Optional Go dependency available for Linux systems offers performance improvement but is not required.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you must include the license notice in distributions.
last release 2025-03-29 (503 days) · last repo commit 2026-04-13 · 81 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 88,810 downloads/mo, #13,704 on PyPI
Alternatives
Verify before relying
pip install Flask-Minify
from flask import Flask
from flask_minify import Minify
app = Flask(__name__)
Minify(app=app, html=True, js=True, cssless=True)- Whether the optional Go dependency (tdewolff-minify) is actually available and maintained on PyPI
- Performance impact of minification on typical Flask applications with various response sizes
- Compatibility with Flask versions beyond those implied by the classifiers
What it is and what it does
Flask-Minify is a Flask extension that intercepts and minifies HTML, JavaScript, CSS, and Less content in your application's responses. It works by parsing outgoing response bodies and reducing their size through whitespace removal and syntax optimization, using pluggable parsers for each content type. By default it minifies all responses unless explicitly bypassed; you can also run it in passive mode to minify only specific decorated routes.
The extension depends on six, flask, lesscpy, htmlminf, jsmin, xxhash, and rcssmin for its core minification logic. It supports caching of minified responses to avoid reprocessing identical content, configurable bypass rules using regex patterns, and optional use of a faster Go-based minifier on Linux systems if the tdewolff-minify package is installed.
Use it for
- Reduce bandwidth and improve page load times in production Flask applications by automatically minifying all HTML, CSS, and JavaScript responses.
- Selectively minify only specific routes using decorators when you need fine-grained control over which endpoints have minified output.
- Bypass minification for certain endpoints (e.g., API responses or dynamically generated content) using regex patterns to exclude them from processing.
- Cache minified response variations to avoid re-minifying identical content on repeated requests, with configurable limits on cached variations.
- Customize minification behavior per content type by replacing default parsers or providing custom parser implementations for specific tags.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Flask-Minify is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem for Flask applications seeking to reduce response size. The MIT license is permissive. Install it if you want automatic minification of HTML, CSS, and JavaScript responses without manual configuration; the decorator and bypass options give you control when you need it.
Install
flask-minify on PyPI
Before you install
Low friction install with a pure-Python default setup. Active maintenance with recent releases; last commit 2026-04-13. Optional Go dependency available for Linux systems offers performance improvement but is not required.
License in practice
MIT license permits commercial and private use with minimal restrictions; you must include the license notice in distributions.
Quickstart
pip install Flask-Minify
from flask import Flask
from flask_minify import Minify
app = Flask(__name__)
Minify(app=app, html=True, js=True, cssless=True)
Verify before relying
- Whether the optional Go dependency (tdewolff-minify) is actually available and maintained on PyPI
- Performance impact of minification on typical Flask applications with various response sizes
- Compatibility with Flask versions beyond those implied by the classifiers
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packagessixflasklesscpyhtmlminfjsminxxhashrcssmin |
| Maintenance | Actively maintained 503 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 88,810 / month, #13,704 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules |
Evidence: Flask_Minify-0.50-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 minify html css js”
- Flask-MinifyFlask extension that automatically minifies HTML, JavaScript, CSS,…
- minify-htmlMinifies HTML, JavaScript, and CSS in a single pass using a…
- mkdocs-minify-pluginMinifies HTML, JavaScript, and CSS files in MkDocs documentation…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also css-html-js-minify · minify-html · Flask-Assets · mkdocs-minify-plugin · django-htmlmin · htmlmin2 · lesscpy · cssmin · jsmin · csscompressor