Change the future

Saturday 5:10 p.m.–5:40 p.m.

Asset Management in Python

Robert Kluin, Beau Lyddon

Audience level:
Novice
Category:
Useful Libraries

Description

With the growth of Coffeescript, Less, SASS, etc..., compiling the assets for your project is becoming more useful. This talk covers using a Python library called Webassets to automate your build process. We specifically focus on getting your Javascript and CSS compiling automatically as you work. We show examples of integrating with common web frameworks like Django and Flask.

Abstract

The need to run a build process has became more common with the adoption of tools like Coffeescript, Less, and SASS. These libraries improve the experience around using Javascript and CSS, but they can make testing, developing, and deploying applications more complicated (and sometimes painful). When adding cache busting into the mix, and the process can be even more complex.

In this talk we explain how you can use a Python library called Webassets to automatically compile your assets as you work. Automatically compiling your Less and Coffeescript files as they change will greatly simplify and accelerate your testing, so you can spend more time doing the fun stuff – writing code. Even better, Webassets scripts are simple Python scripts, meaning you can write more Python code.

For those using common frameworks like Django and Flask, we show how you can use Webassets built in hooks to make this process even more streamlined. We demonstrate how the hooks make cache busting a breeze.