0Pricing
Flask Academy · Lesson

Static Files in Production Reality

Why a real server should serve assets, not Flask.

Fine in Development

Letting Flask serve your assets is perfectly fine while you build locally. In production, though, it is the wrong tool for the job. 🏭

Python Is Slow for Files

Sending a file through Python ties up a worker that should be running your views. Real web servers move bytes far more efficiently.

All lessons in this course

  1. The static Folder Convention
  2. Link Assets with url_for static
  3. Cache Busting with File Versions
  4. Static Files in Production Reality
← Back to Flask Academy