--- id: libsass version: "0.23.0" license: MIT license_treatment: permissive maintenance: dormant --- # libsass — Sass for Python: A straightforward binding of libsass for Python. License: permissive · Maintenance: dormant · Downloads: 2.6M/mo ## What it is and what it does libsass is a straightforward Python binding to LibSass, a C/C++ implementation of the Sass stylesheet language. It lets you compile Sass and SCSS files to CSS directly from Python without needing Ruby, Node.js, or any external toolchain. The package provides a simple API for string compilation, file-based compilation, and integration with web frameworks via WSGI middleware, plus setuptools integration for build-time stylesheet compilation. The binding ships with prebuilt wheels for major platforms (Linux, Windows, macOS on both x86_64 and ARM64), reducing installation friction compared to building from source. It supports CPython 3.8+ and PyPy, with no runtime dependencies beyond the compiled extension itself. The package has been stable since its initial release in 2012, though maintenance appears dormant. Use it for: - Compile Sass/SCSS stylesheets during Python web application builds without external build tools. - Integrate stylesheet preprocessing into setuptools-based projects using the build_sass command. - Serve dynamically compiled CSS during development via WSGI middleware that auto-compiles on each request. - Define custom Sass functions and import callbacks from Python code. - Embed stylesheet compilation in deployment pipelines where only Python is available. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Compiles Sass and SCSS stylesheets to CSS through a Python binding of the C/C++ LibSass library, with no Ruby or Node.js dependency. Yes, if you need Sass compilation in a Python-only environment and can accept the dormant maintenance status. The package is stable and widely used (2581130 monthly downloads), with no known vulnerabilities and permissive MIT licensing. Install friction is moderate due to the C++ extension, but prebuilt wheels mitigate this for common platforms. Not recommended if you expect active maintenance or frequent updates. ## Install pip install libsass uv add libsass poetry add libsass ## Installing libsass Before you install: Medium install friction due to compiled C++ extension requiring a compatible compiler, but prebuilt wheels are provided for Linux, Windows, and macOS. Package is dormant (951 days since last release) but marked Production/Stable. License in practice: MIT license permits commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install libsass import libsass libsass.compile(string='a { b { color: blue; } }') Requires a C++ compiler supporting recent C++ standards if building from source; prebuilt wheels available for common platforms. Verify before relying: - Current maintenance status and likelihood of future updates given 951-day gap since last release. - Whether prebuilt wheels cover all target deployment platforms and Python versions in use. - Specific C++ standard version requirements for compilation from source. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: dormant - Downloads: 2.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags sass scss compiler python, css preprocessing python, libsass binding, sass to css python, stylesheet compilation, stylesheet-compilation, sass-scss, build-tool [View on SkillFed](https://skillfed.io/packages/libsass) · [View on PyPI](https://pypi.org/project/libsass/)