pyramid_scss iconpyramid_scss 0.3.1

Adds support for SCSS to Pyramid projects
pyramid_scss is a Python module that provides a convenient bit of glue code around pyScss, allowing your Pyramid projects to use stylesheets authored in SCSS.


Install using setuptools, e.g. (within a virtualenv):

 pip install pyramid_scss

Or if you prefer to get the latest from Github:

git clone git://


The only setting which is necessary is asset_path which is an asset spec which points to the root folder where your SCSS stylesheets are. An easy way to set that is to add this line to your project.ini:

 scss.asset_path = myproject:assets/scss

asset_path can be a newline delimited string of multiple asset paths. Each path will be searched, in order, until the matching stylesheet is found. An unmatched request will raise pyramid.httpexceptions.HTTPNotFound.

There are a couple of other options. compress controls whether or not the output documents are compressed (all whitespace stripped)

 scss.compress = false

The other option is cache, which will store both the contents of the file and the rendered output in memory.

 scss.cache = true


First, use config.include to initialize the extension:


Second, assuming you are using URL dispatch, add a route to serve css:

 config.add_route('css', '/css/{css_path:.*}.css')

 config.add_view(route_name='css', view='pyramid_scss.controller.get_scss',
 renderer='scss', request_method='GET')

last updated on:
February 20th, 2012, 18:39 GMT
developed by:
Jesse Dhillon
license type:
Other/Proprietary License
ROOT \ Internet \ HTTP (WWW)


In a hurry? Add it to your Download Basket!

user rating



Add your review!