stylus
A bridge to the Stylus css compiler
What it is and what it does
Stylus is a Python wrapper around the Stylus CSS preprocessor. It lets you compile Stylus stylesheets—a more concise CSS syntax with features like mixins and variables—by calling out to the Node.js-based Stylus compiler from your Python code. The package provides a simple Stylus class that accepts stylesheet strings and compiles them to CSS, and supports loading Stylus plugins like Nib.
The package has not been maintained since 2016 and is classified as Alpha. It carries high install friction because it requires both Node.js and the Stylus npm package to be installed and discoverable in your runtime environment before the Python package can function. Given its age and abandonment status, it is unlikely to work reliably with modern Python or Node.js versions without significant troubleshooting.
Use it for:
- Compile Stylus stylesheets to CSS during a Python-based build or asset pipeline.
- Generate CSS dynamically from Stylus code embedded in Python templates or configuration.
- Use Stylus mixins and functions to reduce CSS duplication in a Python web application.
- Integrate Stylus preprocessing into a legacy Python project that predates modern CSS tooling.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Bridges Python code to the Stylus CSS compiler, allowing you to compile Stylus stylesheets from Python by invoking the external Stylus library through Node.js.
No. The package is abandoned (last updated 2016), marked Alpha, and requires external Node.js and npm dependencies that add significant friction. Modern CSS preprocessing is better served by contemporary tools like PostCSS, Sass, or Tailwind, which have active maintenance and better Python integration. Only consider it if you are maintaining a legacy codebase that already depends on it.
Install
stylus on PyPI
pip
pip install stylusuv
uv add styluspoetry
poetry add stylusInstalling stylus
Before you install
High install friction: requires Node.js and the Stylus npm package to be pre-installed and available in your environment. The package itself is abandoned (last commit 2016-02-01) and marked Alpha; it has not been maintained for over a decade.
License in practice
MIT License permits commercial and private use with minimal restrictions, though you must include a copy of the license in distributions.
Quickstart
pip install stylus
from stylus import Stylus
compiler = Stylus()
compiler.compile("body\n font 12px Helvetica")
Node.js must be installed and the Stylus npm package must be available in node_modules or in a location specified by NODE_PATH environment variable.
Verify before relying
- Whether the package works with modern Node.js versions or Python 3, given its Alpha status and lack of maintenance since 2016.
- Current state of the Stylus npm package and whether it remains actively maintained or compatible with modern build tools.
Package facts
| License | MIT License (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,847 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 81,941/month — #14,191 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: stylus-0.1.2.macosx-10.11-x86_64.tar.gz; stylus-0.1.2.tar.gz
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
pybars3Pybars3 compiles and renders Handlebars.js…
copyleft · top 15,000 on PyPI
lesscpyCompiles LESS stylesheets to CSS using Python,…
permissive · top 15,000 on PyPI
pyScssCompiles Sass/SCSS stylesheets to CSS,…
permissive · top 15,000 on PyPI
pybars4Pybars4 compiles and renders Handlebars.js…
copyleft · top 15,000 on PyPI
CoffeeScriptCompiles CoffeeScript code to JavaScript from…
permissive · top 15,000 on PyPI
pynlinerConverts CSS stylesheets to inline styles in…
permissive · top 15,000 on PyPI
django-sass-processorCompiles SASS/SCSS files to CSS on the fly…
permissive · top 15,000 on PyPI
typstCompiles Typst markup documents to PDF, PNG,…
unclear · top 15,000 on PyPI
libsassCompiles Sass and SCSS stylesheets to CSS…
permissive · top 5,000 on PyPI
quipQuip creates a web-based user interface for…
permissive · top 15,000 on PyPI