I would like to include a sass compiler in my Flask application. Is there a generally accepted way of doing this?
Simple one line solution using libsass, after you import sass simply use the compile function with the dirname keyword argument, like this:
sass.compile(dirname=('path/to/sass', 'path/to/css'))
You also have the option to set the output style, for example:
sass.compile(dirname=('path/to/sass', 'path/to/css'), output_style='compressed')
More info: https://sass.github.io/libsass-python