Skip to main content

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

Project description

PyPI Build Status Coverage 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 softwares 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.20.1.tar.gz (316.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.20.1-cp38-cp38-win_amd64.whl (868.2 kB view details)

Uploaded CPython 3.8Windows x86-64

libsass-0.20.1-cp38-cp38-win32.whl (764.1 kB view details)

Uploaded CPython 3.8Windows x86

libsass-0.20.1-cp37-cp37m-win_amd64.whl (868.3 kB view details)

Uploaded CPython 3.7mWindows x86-64

libsass-0.20.1-cp37-cp37m-win32.whl (764.3 kB view details)

Uploaded CPython 3.7mWindows x86

libsass-0.20.1-cp36-cp36m-win_amd64.whl (868.3 kB view details)

Uploaded CPython 3.6mWindows x86-64

libsass-0.20.1-cp36-cp36m-win32.whl (764.3 kB view details)

Uploaded CPython 3.6mWindows x86

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

Uploaded CPython 3.6+

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

Uploaded CPython 3.6+macOS 10.14+ x86-64

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

Uploaded CPython 2.7mu

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

Uploaded CPython 2.7mWindows x86-64

libsass-0.20.1-cp27-cp27m-win32.whl (797.3 kB view details)

Uploaded CPython 2.7mWindows x86

libsass-0.20.1-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.20.1.tar.gz.

File metadata

  • Download URL: libsass-0.20.1.tar.gz
  • Upload date:
  • Size: 316.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1.tar.gz
Algorithm Hash digest
SHA256 e0e60836eccbf2d9e24ec978a805cd6642fa92515fbd95e3493fee276af76f8a
MD5 edfd75596bf62bb4bd6dee22f3450d20
BLAKE2b-256 4162c4927766b1c9e5b997ac8291a876aee98d1aef2d1ac7678ce75b3a3814b2

See more details on using hashes here.

File details

Details for the file libsass-0.20.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: libsass-0.20.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 868.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 daa98a51086d92aa7e9c8871cf1a8258124b90e2abf4697852a3dca619838618
MD5 03500cf8ca58081b22b0051486fa3fc6
BLAKE2b-256 2d8483c14c87651daf6f800c75d4b4b9849135ca3aac3630bb14a6723148e7dc

See more details on using hashes here.

File details

Details for the file libsass-0.20.1-cp38-cp38-win32.whl.

File metadata

  • Download URL: libsass-0.20.1-cp38-cp38-win32.whl
  • Upload date:
  • Size: 764.1 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 f6852828e9e104d2ce0358b73c550d26dd86cc3a69439438c3b618811b9584f5
MD5 f5605b63363a565903784669c71a0a25
BLAKE2b-256 418ffab4a763fa2c23bd7785a7f76957239f926396c315e898e129a2d33e9dcf

See more details on using hashes here.

File details

Details for the file libsass-0.20.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: libsass-0.20.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 868.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 a8fd4af9f853e8bf42b1425c5e48dd90b504fa2e70d7dac5ac80b8c0a5a5fe85
MD5 1b4a5bc9181ad2bd5c85343b0f09aedf
BLAKE2b-256 1a5a5366236505f6fb8809c3d680e55e32117f9327d12d9c8ce87c16fd680661

See more details on using hashes here.

File details

Details for the file libsass-0.20.1-cp37-cp37m-win32.whl.

File metadata

  • Download URL: libsass-0.20.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 764.3 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 c9411fec76f480ffbacc97d8188322e02a5abca6fc78e70b86a2a2b421eae8a2
MD5 bca57e4b6c5d8b5db5f84dba2e155c57
BLAKE2b-256 a892a1eb7839e27930fa763ea53bbef099a7a54d007f0256eb777d52b6fd0eb6

See more details on using hashes here.

File details

Details for the file libsass-0.20.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: libsass-0.20.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 868.3 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 e64ae2587f1a683e831409aad03ba547c245ef997e1329fffadf7a866d2510b8
MD5 21ea0214e25e2a44ffab74a98130ed64
BLAKE2b-256 117718470ce7c837a9d88f9461633d0463d73167fb52e61b71dca2653d95627c

See more details on using hashes here.

File details

Details for the file libsass-0.20.1-cp36-cp36m-win32.whl.

File metadata

  • Download URL: libsass-0.20.1-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 764.3 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 553e5096414a8d4fb48d0a48f5a038d3411abe254d79deac5e008516c019e63a
MD5 57494f15c7a21c4524fbfe75b32633bb
BLAKE2b-256 0c871b499f6ca02e5f4c3243f336f636c54ee746a836e2e9da41f4d2a61de40a

See more details on using hashes here.

File details

Details for the file libsass-0.20.1-cp36-abi3-manylinux1_x86_64.whl.

File metadata

  • Download URL: libsass-0.20.1-cp36-abi3-manylinux1_x86_64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.6+
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1-cp36-abi3-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 25ebc2085f5eee574761ccc8d9cd29a9b436fc970546d5ef08c6fa41eb57dff1
MD5 0d3724b26cd4fbe3a552f9aac701c807
BLAKE2b-256 7fb9fb78500949e1c08840327ae485a6d05c46acff057e28270b74c63566c668

See more details on using hashes here.

File details

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

File metadata

  • Download URL: libsass-0.20.1-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.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1-cp36-abi3-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 2ae806427b28bc1bb7cb0258666d854fcf92ba52a04656b0b17ba5e190fb48a9
MD5 31bb7077a26ff6cf51edcecbb1bc5374
BLAKE2b-256 e04d203eb49bceb70de52e86461d346669fa898f50dbf858d4a9247ed03f3834

See more details on using hashes here.

File details

Details for the file libsass-0.20.1-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: libsass-0.20.1-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1521d2a8d4b397c6ec90640a1f6b5529077035efc48ef1c2e53095544e713d1b
MD5 637945aa31416403859d2a242e056155
BLAKE2b-256 73494165dca63dd0286d12582c9c45d10bcebe8e52037e5e1ad6e580dd3d33c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: libsass-0.20.1-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.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 1b2d415bbf6fa7da33ef46e549db1418498267b459978eff8357e5e823962d35
MD5 0ca4c963ceadd0a922e8afe038b6afc8
BLAKE2b-256 dc98541a9053b01a2ec10901292d19d3c22e5f2a583ff5c8bfa8b40115eec67a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: libsass-0.20.1-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 797.3 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 697f0f9fa8a1367ca9ec6869437cb235b1c537fc8519983d1d890178614a8903
MD5 96cb411600175d5adefa8933800acf23
BLAKE2b-256 f26cfd7e961afb8298b3b8d107ac6e1dca377d8aed017488868b96b6a28933b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: libsass-0.20.1-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.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for libsass-0.20.1-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 4a246e4b88fd279abef8b669206228c92534d96ddcd0770d7012088c408dff23
MD5 bd86189c9b66954568bf176f00f4ae02
BLAKE2b-256 790fdb02777a85f108d31370afc123c50c564e29c92e9901178da8a726c139f0

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