Skip to main content

Sass for Python: A straightforward binding of libsass for Python.

Project description

PyPI Build Status Coverage 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. Need no Ruby nor Node.js.

It currently supports CPython 2.7, 3.6–3.8, and PyPy 2.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.

Download files

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

Source Distribution

libsass-0.21.0.tar.gz (317.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

libsass-0.21.0-cp38-abi3-macosx_12_0_arm64.whl (980.3 kB view details)

Uploaded CPython 3.8+macOS 12.0+ ARM64

libsass-0.21.0-cp36-abi3-win_amd64.whl (868.2 kB view details)

Uploaded CPython 3.6+Windows x86-64

libsass-0.21.0-cp36-abi3-win32.whl (763.4 kB view details)

Uploaded CPython 3.6+Windows x86

libsass-0.21.0-cp36-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl (9.4 MB view details)

Uploaded CPython 3.6+manylinux: glibc 2.5+ x86-64

libsass-0.21.0-cp36-abi3-macosx_10_14_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.6+macOS 10.14+ x86-64

libsass-0.21.0-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl (9.4 MB view details)

Uploaded CPython 2.7mumanylinux: glibc 2.5+ x86-64

libsass-0.21.0-cp27-cp27m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 2.7mWindows x86-64

libsass-0.21.0-cp27-cp27m-win32.whl (803.8 kB view details)

Uploaded CPython 2.7mWindows x86

libsass-0.21.0-cp27-cp27m-macosx_10_14_x86_64.whl (1.1 MB view details)

Uploaded CPython 2.7mmacOS 10.14+ x86-64

File details

Details for the file libsass-0.21.0.tar.gz.

File metadata

  • Download URL: libsass-0.21.0.tar.gz
  • Upload date:
  • Size: 317.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5

File hashes

Hashes for libsass-0.21.0.tar.gz
Algorithm Hash digest
SHA256 d5ba529d9ce668be9380563279f3ffe988f27bc5b299c5a28453df2e0b0fbaf2
MD5 b4edb4171b78642ea644aac689d684da
BLAKE2b-256 42912a8abf59fa20a2b5148d18192fe66877139667cfc02bd3b782bd74b2e3d1

See more details on using hashes here.

File details

Details for the file libsass-0.21.0-cp38-abi3-macosx_12_0_arm64.whl.

File metadata

  • Download URL: libsass-0.21.0-cp38-abi3-macosx_12_0_arm64.whl
  • Upload date:
  • Size: 980.3 kB
  • Tags: CPython 3.8+, macOS 12.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for libsass-0.21.0-cp38-abi3-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 c9ec490609752c1d81ff6290da33485aa7cb6d7365ac665b74464c1b7d97f7da
MD5 1c5a1d3ed525b0ad0a7ea1988cbc7b88
BLAKE2b-256 b1cecf9bc22f3b60841b0185bb3d945c59ab422a0015e538e54f377a480d0dc4

See more details on using hashes here.

File details

Details for the file libsass-0.21.0-cp36-abi3-win_amd64.whl.

File metadata

  • Download URL: libsass-0.21.0-cp36-abi3-win_amd64.whl
  • Upload date:
  • Size: 868.2 kB
  • Tags: CPython 3.6+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5

File hashes

Hashes for libsass-0.21.0-cp36-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 659ae41af8708681fa3ec73f47b9735a6725e71c3b66ff570bfce78952f2314e
MD5 f25958533d7701f161bf6a4097e67a43
BLAKE2b-256 c2331979ab8928732765ad39eb6bdee234c45f3b5bbd4204ac5673ff671b082e

See more details on using hashes here.

File details

Details for the file libsass-0.21.0-cp36-abi3-win32.whl.

File metadata

  • Download URL: libsass-0.21.0-cp36-abi3-win32.whl
  • Upload date:
  • Size: 763.4 kB
  • Tags: CPython 3.6+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5

File hashes

Hashes for libsass-0.21.0-cp36-abi3-win32.whl
Algorithm Hash digest
SHA256 abc29357ee540849faf1383e1746d40d69ed5cb6d4c346df276b258f5aa8977a
MD5 b0363bc31654c78c3d40e08c0cb9c42f
BLAKE2b-256 babb7769b9433a1b3a837a313c1f5e0c5839b10afb8c3e3e157c4ee66c94a2b9

See more details on using hashes here.

File details

Details for the file libsass-0.21.0-cp36-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for libsass-0.21.0-cp36-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e2b1a7d093f2e76dc694c17c0c285e846d0b0deb0e8b21dc852ba1a3a4e2f1d6
MD5 a969147d8e817a7c9c371cb617459975
BLAKE2b-256 e17532838d4a18f3bc1757d3b8005856ec9d14c348a4b8ae6b77387bf4dcfd02

See more details on using hashes here.

File details

Details for the file libsass-0.21.0-cp36-abi3-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: libsass-0.21.0-cp36-abi3-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.6+, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5

File hashes

Hashes for libsass-0.21.0-cp36-abi3-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 12f39712de38689a8b785b7db41d3ba2ea1d46f9379d81ea4595802d91fa6529
MD5 9e8d859c20e20dfbda5c4e0bec928417
BLAKE2b-256 9073a76f690849f864386bb18c8b4a7dfd1db7a390fd26d00fd566e86a076598

See more details on using hashes here.

File details

Details for the file libsass-0.21.0-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for libsass-0.21.0-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1e25dd9047a9392d3c59a0b869e0404f2b325a03871ee45285ee33b3664f5613
MD5 ce08c43c3c48f73d53355c2887947c52
BLAKE2b-256 f7bfdc5902aa2f933f20eceaf2905abe2a8acd4a3cdb04c648e442327b4e8a7f

See more details on using hashes here.

File details

Details for the file libsass-0.21.0-cp27-cp27m-win_amd64.whl.

File metadata

  • Download URL: libsass-0.21.0-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5

File hashes

Hashes for libsass-0.21.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 6b984510ed94993708c0d697b4fef2d118929bbfffc3b90037be0f5ccadf55e7
MD5 c5580d63dff5b75a17cd1ca2b3087683
BLAKE2b-256 03ccc368c650944fe770f27682d28cbe4305625e789d75897d4df29d193d4d9e

See more details on using hashes here.

File details

Details for the file libsass-0.21.0-cp27-cp27m-win32.whl.

File metadata

  • Download URL: libsass-0.21.0-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 803.8 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5

File hashes

Hashes for libsass-0.21.0-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 a005f298f64624f313a3ac618ab03f844c71d84ae4f4a4aec4b68d2a4ffe75eb
MD5 07bc5ad810facd327bbb8e3629defaca
BLAKE2b-256 c1fdb0cb224a4285bdade8d36d961eb37edc03289fe39b29ce9e63b50a4c39b8

See more details on using hashes here.

File details

Details for the file libsass-0.21.0-cp27-cp27m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: libsass-0.21.0-cp27-cp27m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 2.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5

File hashes

Hashes for libsass-0.21.0-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 06c8776417fe930714bdc930a3d7e795ae3d72be6ac883ff72a1b8f7c49e5ffb
MD5 a4c2568d4504273d66a1e5f266aa2bc5
BLAKE2b-256 26a8c27ea1d9abc3b0a66d19a0c596113754b29c4259b43cd86d93ad5460edd7

See more details on using hashes here.

Supported by

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