Registry / devops / htmlminf

htmlminf

JSON →
library0.1.13pypypi✓ verified 79d ago

A simple HTML minifier for Python that removes unnecessary whitespace, comments, and optional quotes. Current version 0.1.13, no longer actively maintained.

pip install htmlminf
INSTALL
IMPORT
SIG · HTMLMINF
H
htmlminf
devopspythonv0.1.13
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Minifier
from htmlmin import Minifier
import htmlminf
minify
from htmlmin import minify
import htmlminf
escape
from htmlmin import escape
import htmlminf

Minify a simple HTML string.

import htmlminf minified = htmlminf.minify('<html> <body> <p>Hello</p> </body></html>') print(minified)
Debug
Known issues
deprecatedhtmlminf is no longer actively maintained. Consider using htmlmin or lxml.html for better support.
fix
Use htmlmin or lxml.html instead.
affects: all
gotchaThe library does not handle script or style content correctly; it may break inline JavaScript/CSS with conditionals or strings containing '>'.
fix
Preprocess content or use a more robust minifier.
affects: all
gotchaNo support for HTML5 tags or modern web standards; may produce invalid HTML5 output.
fix
Test output thoroughly or switch to html5lib-based minifier.
affects: all
Upgrade
Version history
0.1.13latest on PyPI · released Jun 7, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
htmlminf — pip install htmlminf · libregistry