Registry / serialization / tdewolff-minify

tdewolff-minify

JSON →
library2.24.12pypypi✓ verified 80d ago

Python bindings for the Go tdewolff/minify library, providing fast minifiers for HTML, CSS, JS, JSON, SVG, and XML. Current version 2.24.12, released monthly.

pip install tdewolff-minify
INSTALL
IMPORT
SIG · TDEWOLFF-MINIFY
T
tdewolff-minify
serializationpythonv2.24.12
Install
2.7s avg
Import
Disk
24MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.24.12 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 26MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.7s · import 0.000s · 27MB
24MB installed
● package 24MB
Code
Verified usage

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

minify
import minify
from tdewolff_minify import minify

Basic CSS minification. Use 'text/html', 'text/javascript', etc. for other types.

import os from tdewolff_minify import minify, CSSOptions # Minify a CSS string css_input = 'body { color: red; }' options = CSSOptions() result = minify('text/css', css_input, options=options) print(result) # Output: 'body{color:red}'
Debug
Known issues
deprecatedCSSOptions.KeepCSS2 has been removed in v2.24.8; use CSSOptions.Version=2 instead.
fix
Replace 'KeepCSS2=True' with 'Version=2' in CSSOptions.
affects: >=2.24.8
gotchaThe module name uses underscore: 'tdewolff_minify', not 'tdewolff-minify'.
fix
Use 'pip install tdewolff-minify' for installation, but 'from tdewolff_minify import ...' in code.
affects: all
breakingSVG options changed: SVG.Inline is now private; use CSSOptions for inline SVG.
fix
Set CSSOptions.KeepInlineSVG=True instead of using SVG.Inline.
affects: >=2.24.8
Upgrade
Version history
2.24.12latest on PyPI · released Apr 6, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
32 hits · last 30 days
node
30
OpenAI (training)
1
Resources