Skip to main content

A tool which automatically compiles LESS files to CSS.

Project description


LessCSS is a helper which automatically compiles LESS files to CSS when LESS files are modified. It works with Brubeck, and bottle web frameworks. It should work with other framework without any problems though it’s not tested.

Note: You need to install LESS before using this.


$ pip install lesscss


An example usage

from lesscss import LessCSS
LessCSS(media_dir='media', exclude_dirs=['img', 'src'], based=True, compression='x')


  • media_dir: Directory where you put static/media files such as css/js/img.
  • exclude_dirs: Directories you don’t want to be searched. It’d be pointless to search for less files in an images directory. This parameter is expected to be a list.
  • based: If it’s set True then LessCSS will generate the style-(base60).css version as well (for example; style-dHCFD.css). This is useful if you set expire times of static files to a distant future since browsers will not retrieve those files unless the name is different or the cache has expired. This parameter is expected to be a boolean value.
  • compressed: If it’s set True then LessCSS will minimize the generated CSS files. This parameter is expected to be a boolean value.
  • compression: Specifies the type of compression to use. Default to the normal compression, ‘x’. Other option is to use the YUI Compressor. See “Command-line Usage” at
  • output_dir: Directory where you put compiled CSS files if different than location of .less file.

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

lesscss-0.1.4.tar.gz (4.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page