$npx skillfedfor your agent

django-htmlmin

HTML minifier for Python frameworks (not only Django, despite the name).

SkipPyPI HTMLReleased Mar 2019906.3K downloads / mopermissive licenseSource build

Decision gist · record as of 2026-08-14

sdist only — django-htmlmin-0.11.0.tar.gz · builds from source
v0.11.0 · released 2019-03-18

No. The package is abandoned (no releases since 2019-03-18) and its declared support covers only obsolete Django and Python versions. While the core minification logic may still function, there is no active maintenance, no testing against modern frameworks, and no assurance of correctness or security. For a maintained alternative, consider a current web framework's built-in optimization features.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Package is abandoned and untested against modern Django and Python versions.
  • Compatibility not guaranteed.
  • High install friction: the package is abandoned (last release 2019-03-18, no activity for 2706 days).

License · maintenance · safety

permissive license (permissive) — Distributed under BSD-style license (permissive). No restrictions on commercial or private use, but you should verify the LICENSE file matches your compliance requirements.

last release 2019-03-18 (2706 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 906,300 downloads/mo, #4,759 on PyPI

Verify before relying

# Django middleware setup
MIDDLEWARE_CLASSES = (
    'htmlmin.middleware.HtmlMinifyMiddleware',
    'htmlmin.middleware.MarkRequestMiddleware',
)
HTML_MINIFY = True

# Or standalone function
from htmlmin.minify import html_minify
minified = html_minify('<div>  content  </div>')
  • Whether the package works with Django versions after 2.1.
  • Whether the package works with Python versions after 3.7.
  • Whether minification output is correct for HTML 5 edge cases.
  • Whether the command-line tool is still functional and discoverable after installation.
Same gist for agents: .md · .json

What it is and what it does

django-htmlmin is an HTML minifier that strips whitespace, newlines, and optionally comments from HTML markup to reduce payload size. It integrates with Django via middleware or decorators, works standalone with other Python web frameworks via a direct function call, and includes a command-line tool for static files. The middleware can be configured to minify selectively by URL pattern and respects Django's DEBUG setting by default.

The package has no runtime dependencies and is lightweight, but it is abandoned: the last release was 2019-03-18, and the declared support covers only Django 1.11–2.1 and Python 2.7–3.7—all now end-of-life. While the minification logic itself may still work, there is no active maintenance, no testing against modern versions, and no guarantee of compatibility with current Django or Python releases.

Use it for

  • Reduce HTML response size in production Django deployments by automatically minifying rendered templates via middleware.
  • Minify static HTML files in build or deployment scripts using the command-line tool without a web framework.
  • Selectively minify specific views by wrapping them with the html_minify() function.
  • Exclude sensitive URLs from minification using regex patterns in EXCLUDE_FROM_MINIFYING.
  • Preserve HTML comments during minification by setting KEEP_COMMENTS_ON_MINIFYING to True.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Skip

No.

The package is abandoned (no releases since 2019-03-18) and its declared support covers only obsolete Django and Python versions. While the core minification logic may still function, there is no active maintenance, no testing against modern frameworks, and no assurance of correctness or security. For a maintained alternative, consider a current web framework's built-in optimization features.

Install

django-htmlmin on PyPI

Before you install

High install friction: the package is abandoned (last release 2019-03-18, no activity for 2706 days). Classifiers list Django 1.11–2.1 and Python 2.7–3.7, all now unsupported. No runtime dependencies, but compatibility with modern Django and Python versions is unverified.

Package is abandoned and untested against modern Django and Python versions. Compatibility not guaranteed.

License in practice

Distributed under BSD-style license (permissive). No restrictions on commercial or private use, but you should verify the LICENSE file matches your compliance requirements.

Quickstart

# Django middleware setup
MIDDLEWARE_CLASSES = (
    'htmlmin.middleware.HtmlMinifyMiddleware',
    'htmlmin.middleware.MarkRequestMiddleware',
)
HTML_MINIFY = True

# Or standalone function
from htmlmin.minify import html_minify
minified = html_minify('<div>  content  </div>')

Verify before relying

  • Whether the package works with Django versions after 2.1.
  • Whether the package works with Python versions after 3.7.
  • Whether minification output is correct for HTML 5 edge cases.
  • Whether the command-line tool is still functional and discoverable after installation.

Package facts

Licensepermissive license permissive
Python supportNot specified
Install frictionHigh. Source build required
Runtime dependenciesNone
MaintenanceAbandoned 2,706 days since the last release
First released
Downloads906,300 / month, #4,759 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: DjangoFramework :: Django :: 1.11Framework :: Django :: 2.0Framework :: Django :: 2.1Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Topic :: Text Processing :: Markup :: HTML

Evidence: django-htmlmin-0.11.0.tar.gz

Tags

Capabilities
html minifier pythondjango html minification middlewarereduce html file sizehtml whitespace removalhtml minify command linestatic site html compressionhtml payload optimization
Topics
abandonedhtml-optimizationlegacy-django
PyPI keywords
djangohtmlminifierminify

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 › “django html minification middleware”

  • django-htmlminMinifies HTML by removing whitespace and comments, reducing response…
  • minify-htmlMinifies HTML, JavaScript, and CSS in a single pass using a…
  • django-pipelinedjango-pipeline bundles and compresses CSS and JavaScript assets in…

Give your agent the search over MCP, or paste the wish link into any chat.

More HTML packages

MarkupSafe Worth it
PyPI · Dynamic Content · released Sep 2025

MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.

BSD-3-Clausecompiled wheel · 3.9+aging
797.1Mdownloads / mo
Jinja2 Worth it
PyPI · Dynamic Content · released Mar 2025

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.

BSD-3-Clausepure Python · 3.7+aging
718.6Mdownloads / mo
beautifulsoup4 Worth it
PyPI · Python Modules · released Jun 2026

Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.

Install it if you need to parse or extract data from markup documents.

MITpure Python · 3.7.0+
432.1Mdownloads / mo
lxml Worth it
PyPI · Python Modules · released May 2026

lxml provides Python bindings to libxml2 and libxslt, enabling parsing, validation, and transformation of XML and HTML documents through an ElementTree-compatible API with support for XPath, XSLT, and schema validation.

Install it if you need robust XML/HTML parsing, validation, or transformation; avoid it only if you must stay pure-Python and can accept slower performance.

permissive licensecompiled wheel · 3.8+
416.8Mdownloads / mo
docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
Markdown Worth it
PyPI · Python Modules · released Jul 2026

Converts Markdown text to HTML using a Python implementation of John Gruber's Markdown specification, with support for extensions.

Install it if you need to parse Markdown in Python.

BSD-3-Clausepure Python · 3.10+
121.7Mdownloads / mo

See also htmlmin2 · htmlmin · Flask-Minify · minify-html · mkdocs-minify-plugin · JSON_minify · python-minifier · rcssmin · css-html-js-minify · rjsmin