rcssmin
CSS Minifier
What it is and what it does
RCSSmin is a CSS minifier that reduces CSS file size by removing whitespace, comments, and optional semicolons while preserving the stylesheet's functionality. It performs syntactical compression only—it strips unnecessary characters but does not restructure or optimize CSS rules semantically. The package is implemented in C for speed, making it suitable for runtime use rather than just build-time preprocessing, though it also supports Python 2.7 and Python 3.6 and later.
The minifier recognizes CSS syntax quirks including the nesting selector (&), unicode escapes, data URLs, and several browser-specific hacks (IE7, Mac-IE5, and IE6 workarounds). It keeps CSS strings intact and can optionally preserve comments marked with an exclamation mark. With no runtime dependencies, it installs as a compiled extension across many Linux platforms and Python versions.
Use it for:
- Minify CSS at runtime in web applications to reduce bandwidth and improve page load times without a separate build step.
- Process user-uploaded or dynamically generated CSS stylesheets before serving them to clients.
- Integrate CSS compression into a Python-based static site generator or template system.
- Reduce CSS file size in embedded or IoT applications where storage and transmission are constrained.
- Preprocess CSS in a web framework middleware to automatically compress stylesheets on the fly.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
RCSSmin minifies CSS by removing spaces, comments, and unnecessary characters while preserving CSS semantics and supporting common CSS hacks.
Yes, if you need runtime CSS minification in Python and are comfortable with a C-compiled dependency. The package is stable (Production/Stable status), has no known vulnerabilities, and is well-established (in top 5000 PyPI packages by downloads). However, the 306-day gap since the last release and aging maintenance status suggest limited active development; verify that the package still meets your platform and Python version requirements before relying on it for new projects.
Install
rcssmin on PyPI
pip
pip install rcssminuv
uv add rcssminpoetry
poetry add rcssminInstalling rcssmin
Before you install
Medium install friction due to compiled C extensions across multiple platform wheels (manylinux, musllinux, aarch64). No runtime dependencies. Last release was 306 days ago; maintenance status is aging.
License in practice
Licensed under Apache License Version 2.0, a permissive open-source license. You may use, modify, and distribute the package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install rcssmin
import rcssmin
minified = rcssmin.cssmin('body { color: red; /* comment */ }')
Verify before relying
- Whether the C extension is reliably built and tested on all advertised platforms (manylinux, musllinux, aarch64)
- Current maintenance status and whether the 306-day gap since last release indicates active or dormant development
- Performance improvement claims ('factor 100 or so') and whether they hold on modern Python versions
Package facts
| License | Apache License, Version 2.0 (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 306 days since the last release |
| First released | |
| Downloads | 2,864,217/month — #2,854 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: rcssmin-1.2.2-cp27-cp27m-manylinux1_i686.whl; rcssmin-1.2.2-cp27-cp27m-manylinux1_x86_64.whl; rcssmin-1.2.2-cp27-cp27mu-manylinux1_i686.whl; rcssmin-1.2.2-cp27-cp27mu-manylinux1_x86_64.whl; rcssmin-1.2.2-cp310-cp310-manylinux1_i686.whl; rcssmin-1.2.2-cp310-cp310-manylinux1_x86_64.whl; rcssmin-1.2.2-cp310-cp310-manylinux2014_aarch64.whl; rcssmin-1.2.2-cp310-cp310-musllinux_1_1_aarch64.whl; rcssmin-1.2.2-cp310-cp310-musllinux_1_1_i686.whl; rcssmin-1.2.2-cp310-cp310-musllinux_1_1_x86_64.whl; rcssmin-1.2.2-cp311-cp311-manylinux1_i686.whl; rcssmin-1.2.2-cp311-cp311-manylinux1_x86_64.whl; rcssmin-1.2.2-cp311-cp311-manylinux2014_aarch64.whl; rcssmin-1.2.2-cp311-cp311-musllinux_1_1_aarch64.whl; rcssmin-1.2.2-cp311-cp311-musllinux_1_1_i686.whl; rcssmin-1.2.2-cp311-cp311-musllinux_1_1_x86_64.whl; rcssmin-1.2.2-cp312-cp312-manylinux1_i686.whl; rcssmin-1.2.2-cp312-cp312-manylinux1_x86_64.whl; rcssmin-1.2.2-cp312-cp312-manylinux2014_aarch64.whl; rcssmin-1.2.2-cp312-cp312-musllinux_1_1_aarch64.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
csscompressorCompresses CSS by removing unnecessary…
permissive · top 5,000 on PyPI
cssminCompresses CSS files by removing unnecessary…
unclear · top 15,000 on PyPI
rjsminrjsmin minifies JavaScript code by removing…
permissive · top 5,000 on PyPI
css-html-js-minifyMinifies CSS, HTML, and JavaScript files or…
copyleft · top 15,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
minify-htmlMinifies HTML, JavaScript, and CSS in a single…
permissive · top 5,000 on PyPI
django-htmlminMinifies HTML by removing whitespace and…
permissive · top 5,000 on PyPI
jsminMinifies JavaScript code by removing…
permissive · top 5,000 on PyPI
django-compressorDjango Compressor combines, minifies, and…
permissive · top 5,000 on PyPI