cssmin
A Python port of the YUI CSS compression algorithm.
What it is and what it does
cssmin is a Python port of the YUI CSS Compressor that reduces CSS file size by stripping whitespace and unnecessary characters. It works both as a command-line utility (piping CSS through `cssmin`) and as a Python library (calling `cssmin.cssmin()` on a CSS string). The package has no runtime dependencies.
However, the package is abandoned: the latest release is from October 2013, and the repository shows no commits since December 2022. This means it receives no maintenance, bug fixes, or updates for modern CSS features or Python versions. Using it in new projects carries risk of incompatibility and unaddressed security or correctness issues.
Use it for:
- Build scripts that need to minify CSS as part of a legacy project still using this specific tool
- Offline CSS compression when modern build tools are unavailable or undesirable
- Batch processing CSS files from the command line in environments where the tool is already installed
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Compresses CSS files by removing unnecessary characters while preserving functionality, available as both a command-line tool and Python library.
No. The package is abandoned (last release 2013, no maintenance since 2022), has an unclear license, and high install friction. Modern CSS minifiers (integrated into webpack, esbuild, PostCSS, or other active build tools) are better maintained, faster, and handle contemporary CSS features. Install only if you are maintaining legacy code that already depends on it.
Install
cssmin on PyPI
pip
pip install cssminuv
uv add cssminpoetry
poetry add cssminInstalling cssmin
Before you install
High install friction due to source-only distribution. Package is abandoned—last release October 2013, no commits since December 2022—making it unmaintained and unsuitable for new projects.
License in practice
License is marked UNKNOWN with no SPDX identifier, creating legal ambiguity about permitted use and redistribution.
Quickstart
pip install cssmin
import cssmin
output = cssmin.cssmin(open('input.css').read())
print(output)
No explicit Python version requirement specified; compatibility with modern Python versions is unverified.
Verify before relying
- Whether the package works correctly with Python 3.x versions
- Whether the YUI CSS Compressor algorithm it ports remains adequate for modern CSS
- What the actual license is (marked UNKNOWN in metadata)
Package facts
| License | UNKNOWN (unclear) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 4,687 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 153,956/month — #10,865 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cssmin-0.2.0.tar.gz
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
csscompressorCompresses CSS by removing unnecessary…
permissive · top 5,000 on PyPI
rcssminRCSSmin minifies CSS by removing spaces,…
permissive · top 5,000 on PyPI
jsminMinifies JavaScript code by removing…
permissive · top 5,000 on PyPI
htmlmin2Minifies HTML by removing unnecessary…
permissive · top 5,000 on PyPI
htmlminMinifies HTML by removing unnecessary…
permissive · top 5,000 on PyPI
webassetsMerges and compresses JavaScript and CSS files…
permissive · top 15,000 on PyPI
mkdocs-minify-pluginMinifies HTML, JavaScript, and CSS files in…
permissive · top 5,000 on PyPI
django-compressorDjango Compressor combines, minifies, and…
permissive · top 5,000 on PyPI
Flask-MinifyFlask extension that automatically minifies…
permissive · top 15,000 on PyPI
minify-htmlMinifies HTML, JavaScript, and CSS in a single…
permissive · top 5,000 on PyPI