How to Minify CSS with Python To run this: pip install -r requirements.txt. Put your CSS file in the style folder. Put your HTML file in the current (root) folder. Run python minimize.py A new file will appear named min.css in the current working folder.