Registry / serialization / pyScss

pyScss

JSON →
library1.4.0pypypi✓ verified 86d ago

A Scss (Sassy CSS) compiler for Python. Version 1.4.0, with irregular releases. Implements the SCSS syntax (a CSS preprocessor) and outputs CSS.

pip install pyScss
INSTALL
IMPORT
SIG · PYSCSS
P
pyScss
serializationpythonv1.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Scss
from scss import Scss
from pyScss import Scss
The top package is 'scss', not 'pyScss'.

Compile SCSS to CSS using the Scss class.

from scss import Scss scss = Scss() css = scss.compile(''' $color: #ff0000; body { color: $color; } ''') print(css)
pyScss --version
Debug
Known issues
gotchaImport from 'scss' not 'pyScss'.
fix
Use 'from scss import Scss'.
affects: all
deprecatedPython 2 support ending; Python 3.6+ required in future.
fix
Upgrade to 1.4.0 (Python 3 compatible) and ensure Python 3.6+.
affects: <=1.3.7
gotchapyScss uses its own non-standard SCSS syntax; not fully compatible with Ruby Sass or LibSass.
fix
Test your SCSS; prefer libsass (pysass) for compatibility.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'scss'
Package installed but imported incorrectly as 'pyScss'.
fix
Install 'pyScss' but import as 'scss': 'pip install pyScss' then 'from scss import Scss'.
SyntaxError: invalid syntax (file.py line X) ... pyScss uses six
Using Python 3.9+ with older pyScss that relies on deprecated 'collections' imports from 'six'.
fix
Upgrade pyScss to 1.4.0 (fixes Python 3 compatibility).
Upgrade
Version history
1.4.0latest on PyPI · released Feb 23, 2022
Audit
Dependencies
sixrequiredUsed for Python 2/3 compatibility
Agent activity
8 hits · last 30 days
node
8
Resources
pyScss — pip install pyScss · libregistry