skillfed

stylus

A bridge to the Stylus css compiler

stylus v0.1.2 81.9K downloads/30d#14,191 on PyPI14
Permissive license MIT License Abandoned released

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 stylus

uv

uv add stylus

poetry

poetry add stylus

Installing 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

Development Status :: 3 - AlphaProgramming Language :: Python :: 2Programming Language :: Python :: 2.7

Tags

stylus css compiler pythoncompile stylus from pythonpython stylus bridgecss preprocessing stylusstylus stylesheet compilation
css-preprocessingabandoned

More Build Tools packages