Skip to main content

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

Project description

The latest PyPI release Build Status Build Status (Windows) 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.6, 2.7, 3.3, 3.4, 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.

  • 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 binary for Windows.

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:

http://hongminhee.org/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.

Project details


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.7.0.tar.gz (192.6 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.7.0-cp34-none-win_amd64.whl (371.9 kB view details)

Uploaded CPython 3.4Windows x86-64

libsass-0.7.0-cp34-none-win32.whl (296.7 kB view details)

Uploaded CPython 3.4Windows x86

libsass-0.7.0-cp34-cp34m-macosx_10_6_intel.whl (1.0 MB view details)

Uploaded CPython 3.4mmacOS 10.6+ Intel (x86-64, i386)

libsass-0.7.0-cp33-none-win_amd64.whl (371.9 kB view details)

Uploaded CPython 3.3Windows x86-64

libsass-0.7.0-cp33-none-win32.whl (296.6 kB view details)

Uploaded CPython 3.3Windows x86

libsass-0.7.0-cp33-cp33m-macosx_10_6_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.3mmacOS 10.6+ x86-64

libsass-0.7.0-cp27-none-win_amd64.whl (371.7 kB view details)

Uploaded CPython 2.7Windows x86-64

libsass-0.7.0-cp27-none-win32.whl (296.9 kB view details)

Uploaded CPython 2.7Windows x86

libsass-0.7.0-cp27-none-macosx_10_10_intel.whl (971.2 kB view details)

Uploaded CPython 2.7macOS 10.10+ Intel (x86-64, i386)

libsass-0.7.0-cp26-none-win_amd64.whl (372.0 kB view details)

Uploaded CPython 2.6Windows x86-64

libsass-0.7.0-cp26-none-win32.whl (297.1 kB view details)

Uploaded CPython 2.6Windows x86

libsass-0.7.0-cp26-none-macosx_10_10_intel.whl (971.2 kB view details)

Uploaded CPython 2.6macOS 10.10+ Intel (x86-64, i386)

File details

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

File metadata

  • Download URL: libsass-0.7.0.tar.gz
  • Upload date:
  • Size: 192.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for libsass-0.7.0.tar.gz
Algorithm Hash digest
SHA256 c3a14053e7c7e72b77c97b0796fed9425505d48cf0ad67bfcab100e80ad5b43c
MD5 809e4f66bd54eeb46342d7462ce961e6
BLAKE2b-256 3bebbad726f4af27307e6e96fade8494d9f3455a4bdc5c7e08314bcaff0a43b4

See more details on using hashes here.

File details

Details for the file libsass-0.7.0-cp34-none-win_amd64.whl.

File metadata

File hashes

Hashes for libsass-0.7.0-cp34-none-win_amd64.whl
Algorithm Hash digest
SHA256 71902f76ddc0ba124b3c06253c1b69c309f172547dba7e0b85ae003c99325463
MD5 de321b3127e7cbb0fe7771a11c16a469
BLAKE2b-256 d6e0900172d7c3e6f92d86a9a8896ed7f9692711ff4f9b4af985f94bb08948ef

See more details on using hashes here.

File details

Details for the file libsass-0.7.0-cp34-none-win32.whl.

File metadata

File hashes

Hashes for libsass-0.7.0-cp34-none-win32.whl
Algorithm Hash digest
SHA256 d27cd9c7a68e10fc8d8a5c525c0d6fb5505b2650f22eabf804fbc974eda68477
MD5 73fae1056b7ccdf3a1d55e3135919b87
BLAKE2b-256 108385e66e7ad40c403375d5726c4d6ec7b73f448b1312ed596ff5871db7ba66

See more details on using hashes here.

File details

Details for the file libsass-0.7.0-cp34-cp34m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for libsass-0.7.0-cp34-cp34m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 7bc21e9fcfcad0219fb3b10d39068062c6a6b133d8687820cfd48f46e1989e02
MD5 89c3a895211ac040fea5eac324475ea5
BLAKE2b-256 673c53ded1d05928b930030323b9703047b92065f52822d9ce960135e4ccc378

See more details on using hashes here.

File details

Details for the file libsass-0.7.0-cp33-none-win_amd64.whl.

File metadata

File hashes

Hashes for libsass-0.7.0-cp33-none-win_amd64.whl
Algorithm Hash digest
SHA256 e03240c82b084ac5d0078992b3590ab6f4ee0954b91e3cb7da533f5a4adc8b27
MD5 75bd21189ed99fade1ca9e3548be844a
BLAKE2b-256 0a898373aade759d14af0fee14d6d9724970921c68020eebb1cb04024222ba5f

See more details on using hashes here.

File details

Details for the file libsass-0.7.0-cp33-none-win32.whl.

File metadata

File hashes

Hashes for libsass-0.7.0-cp33-none-win32.whl
Algorithm Hash digest
SHA256 e4ddfdd39ba53ce4e1ab057d946c80b7915dc566f65bf7cc18ae109cd7bd774a
MD5 8429a8d8ad06167da856ee1a70ca9f93
BLAKE2b-256 d9b1b0d527e6ce30cb522f402c37cd5d579f24da45c4610f5c3583191fe7f3ad

See more details on using hashes here.

File details

Details for the file libsass-0.7.0-cp33-cp33m-macosx_10_6_x86_64.whl.

File metadata

File hashes

Hashes for libsass-0.7.0-cp33-cp33m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 b138429159dfb9c830ead6e8259a118c74832d2d0b0fe9c4fdda48d7d32aae00
MD5 9c35e8447b367accac15cc4b2714f17b
BLAKE2b-256 d51daf1028b44df7ccc935218ac99b24f1f4206465ed343b2bd554bbb320ebc0

See more details on using hashes here.

File details

Details for the file libsass-0.7.0-cp27-none-win_amd64.whl.

File metadata

File hashes

Hashes for libsass-0.7.0-cp27-none-win_amd64.whl
Algorithm Hash digest
SHA256 8ed5a8c59d69500d58a530fafd492ec2281014a8a0763dc1d55d08463598e7be
MD5 33936cefb1d19f4ff574061e839e7482
BLAKE2b-256 2eaacc0942720f17ea3631d4ea7c3ccd6fbfa79a09eebce8827099478770285f

See more details on using hashes here.

File details

Details for the file libsass-0.7.0-cp27-none-win32.whl.

File metadata

File hashes

Hashes for libsass-0.7.0-cp27-none-win32.whl
Algorithm Hash digest
SHA256 0692f7ea26d91236c1c5c7863ffe953132e34c75a1ea4c1915668a0b8d8fc614
MD5 9dab87b866545b3f14e69d879e0968c0
BLAKE2b-256 686f415c9210e0fa6feb0e89154aaf3385d0ee9d1d8fd824c51f43d30da5f311

See more details on using hashes here.

File details

Details for the file libsass-0.7.0-cp27-none-macosx_10_10_intel.whl.

File metadata

File hashes

Hashes for libsass-0.7.0-cp27-none-macosx_10_10_intel.whl
Algorithm Hash digest
SHA256 b8757a419d94d0456ccd047db07717f5c60a24097e76c91ea638756172c7467b
MD5 a68f5e26fe36b7e4871d3f2dde51d9d7
BLAKE2b-256 2ccf350f0efd96cceb507df331e0456cb9c9bb07e7dac00c7541c2fb8cb0ed34

See more details on using hashes here.

File details

Details for the file libsass-0.7.0-cp26-none-win_amd64.whl.

File metadata

File hashes

Hashes for libsass-0.7.0-cp26-none-win_amd64.whl
Algorithm Hash digest
SHA256 91b0571ee9c876b7c8a1326247a7fd5cc0253df14c09481fe9cc79b718a6f3d8
MD5 4fb13ee81517e845ec52757afd9603d8
BLAKE2b-256 e3a37f7b69abb8bbc9b9fdc5ee4e023e939f02a628177e97a9ddd565c558863f

See more details on using hashes here.

File details

Details for the file libsass-0.7.0-cp26-none-win32.whl.

File metadata

File hashes

Hashes for libsass-0.7.0-cp26-none-win32.whl
Algorithm Hash digest
SHA256 6019171e7e85c25c08ec3c5ccdc5f8ed9bbad7e18d0d6caf52c478869de911a3
MD5 8667b858919a7eeb9d0a34b0f66576ce
BLAKE2b-256 d4dbfe1ff8ea6e62057e2918099783aa6e79002c06fef3bea98b22866e0bbc01

See more details on using hashes here.

File details

Details for the file libsass-0.7.0-cp26-none-macosx_10_10_intel.whl.

File metadata

File hashes

Hashes for libsass-0.7.0-cp26-none-macosx_10_10_intel.whl
Algorithm Hash digest
SHA256 34002b1537cdeab4f58b36c3293b7664068d4528c0849638fa1164e34cececf3
MD5 7e69f0ef18735b82a6be09e66731a9d3
BLAKE2b-256 82d5d371cf50969dc7f092f228ce12d07664e3bfa5fb15184401f462da33a2bd

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