Skip to main content

Sass for Python (binary wheels)

Project description

PyPI Build Status pre-commit.ci status

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 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.

It currently supports CPython 3.7+, and PyPy 3!

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

libsass_bin-0.22.0.post1-cp37-abi3-win_amd64.whl (881.6 kB view details)

Uploaded CPython 3.7+ Windows x86-64

libsass_bin-0.22.0.post1-cp37-abi3-win32.whl (775.0 kB view details)

Uploaded CPython 3.7+ Windows x86

libsass_bin-0.22.0.post1-cp37-abi3-musllinux_1_1_x86_64.whl (15.3 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.1+ x86-64

libsass_bin-0.22.0.post1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.2 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

libsass_bin-0.22.0.post1-cp37-abi3-macosx_10_9_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.7+ macOS 10.9+ x86-64

File details

Details for the file libsass_bin-0.22.0.post1-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for libsass_bin-0.22.0.post1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 174e31fdae51d08d2424efb107f60629da36f5e03fe8e4d2ed3050848283bfc8
MD5 0b3836cdcd49c8dbdaa479a0e6cb8621
BLAKE2b-256 4f3087175b0baeb45e04170e571ff01a760cd5136d4bdbb80d167ca3fd60848d

See more details on using hashes here.

File details

Details for the file libsass_bin-0.22.0.post1-cp37-abi3-win32.whl.

File metadata

File hashes

Hashes for libsass_bin-0.22.0.post1-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 244d492d45ba76891392f38d38de065df6314754e31a71371dc1a2a0e37d14f8
MD5 bba0cdc042f361b313df26abd37ebaee
BLAKE2b-256 e041e0367a72e33af01d81b5012a350d90d39f9c8aef11e4219b4c293d53f3a0

See more details on using hashes here.

File details

Details for the file libsass_bin-0.22.0.post1-cp37-abi3-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for libsass_bin-0.22.0.post1-cp37-abi3-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 8cad5c0e4328192233659e8b347fe9fd80a55f79981207509d00681b8bbdf90d
MD5 c668ac0de2cb1669c0f4f0134c56d93a
BLAKE2b-256 6d7f9b54edd58337c5de53e3ff1c15b5dc94d03c1dfe8381269c44d433e87bc4

See more details on using hashes here.

File details

Details for the file libsass_bin-0.22.0.post1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libsass_bin-0.22.0.post1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 eb54bbd88449eede99cbb3e120deab4f922da9f6f1547490170e0064a80eebb2
MD5 655479a726fda54614d0fb5caa827641
BLAKE2b-256 f3f460ab7190bc22eebcae7ebc0f9aa587e246d5df4da5aaaebd17ae672420a8

See more details on using hashes here.

File details

Details for the file libsass_bin-0.22.0.post1-cp37-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for libsass_bin-0.22.0.post1-cp37-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bf6ba8af4efd67407f1a6e53fd73559e8eba1216f4307e6635c73f598fae9f8b
MD5 be83cde979855c85a1e700ddeb2d0217
BLAKE2b-256 f5b33437bb24defd2b1c66dbcb8026221ece96a62180ea0ca744e66f6f0e77bd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page