This package provides a simple Python extension module sass which is binding LibSass (written in C/C++ by Hampton Catlin and Aaron Leung). It’s very straightforward and there isn’t any headache related to Python distribution/deployment. That means you can add just libsass into your setup.py’s install_requires list or requirements.txt file. No need for Ruby nor Node.js.
Features
You don’t need any Ruby/Node.js stack at all, for development or deployment either.
Fast. (LibSass is written in C++.)
Simple API. See the below example code for details.
Custom functions.
@import callbacks.
Support both tabbed (Sass) and braces (SCSS) syntax.
WSGI middleware for ease of development. It automatically compiles Sass/SCSS files for each request.
setuptools/distutils integration. You can build all Sass/SCSS files using setup.py build_sass command.
Works also on PyPy.
Provides prebuilt wheel binaries for Linux, Windows, and Mac.
Install
It’s available on PyPI, so you can install it using pip (or easy_install):
$ pip install libsass
Example
>>> import sass
>>> print sass.compile(string='a { b { color: blue; } }')
a b {
color: blue; }
Docs
There’s the user guide manual and the full API reference for libsass:
https://sass.github.io/libsass-python/
You can build the docs by yourself:
$ cd docs/
$ make html
The built docs will go to docs/_build/html/ directory.
Credit
Hong Minhee wrote this Python binding of LibSass.
Hampton Catlin and Aaron Leung wrote LibSass, which is portable C/C++ implementation of Sass.
Hampton Catlin originally designed Sass language and wrote the first reference implementation of it in Ruby.
The above three are all distributed under MIT license.
Metadata
Release files for libsass-bin 0.23.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| libsass_bin-0.23.0-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details |
| libsass_bin-0.23.0-cp38-abi3-musllinux_1_1_x86_64.whl | CPython 3.8 | abi3 | Linux musl 1.1+ x86-64 | Details |
| libsass_bin-0.23.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| libsass_bin-0.23.0-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details |
| libsass_bin-0.23.0-cp38-abi3-macosx_10_9_x86_64.whl | CPython 3.8 | abi3 | macOS 10.9+ x86-64 | Details |
Total release size: 32.6 MB
Release files / libsass_bin-0.23.0-cp38-abi3-win_amd64.whl
| Download URL | libsass_bin-0.23.0-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 874.8 kB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
513db4d24c4fd0b5de1a741eaa690b6a8357ede2c0aba4af584e3ed2c0e3e586
|
|
BLAKE2b-256 checksum How to use checksums |
c4364b957ca01bc8741ea89ae392fc722f0d682865ebbbf5bb20c3f5b8861e8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / libsass_bin-0.23.0-cp38-abi3-musllinux_1_1_x86_64.whl
| Download URL | libsass_bin-0.23.0-cp38-abi3-musllinux_1_1_x86_64.whl |
|---|---|
| Size | 15.4 MB |
| Tags | CPython 3.8 Linux musl 1.1+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c05b61f866d71435d32d8176ca5ab9c82f041bcf1d162ec8ed2c02afb88cdb1d
|
|
BLAKE2b-256 checksum How to use checksums |
3704c6eb690b8cdebbf403ab13079358d64245a7a17317b5b2b22e994eda12f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / libsass_bin-0.23.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | libsass_bin-0.23.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 14.2 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f0f2cdb8387fd446046150a77b85688daa4895ef15227e17df136c5c337168bf
|
|
BLAKE2b-256 checksum How to use checksums |
5646401eeddee991dada9c480ce1c5e1107d7e0fb126fad0367c164de0aa0662
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / libsass_bin-0.23.0-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | libsass_bin-0.23.0-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 996.0 kB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
76f8c8584a46b7c2d9e0f74e8a53d3411146ff5b765f3e7d5312fdf9867946cb
|
|
BLAKE2b-256 checksum How to use checksums |
78c54aac7dd9a8f0ce4219d103cf7a9c05fdfef15ac378dd18202664ca1c278c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / libsass_bin-0.23.0-cp38-abi3-macosx_10_9_x86_64.whl
| Download URL | libsass_bin-0.23.0-cp38-abi3-macosx_10_9_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.8 abi3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
f0d59046dae11e5f79e4e563f8abfef225cb523ab1e85b563f2d8c5cd8ce0dfb
|
|
BLAKE2b-256 checksum How to use checksums |
56b3c5ca667ad9449c90a39b1127581250ae7fe8212a3644f0fa4635044baac7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|