How to pick a web framework in Python
Do you need a web framework?
If you need to draw a graph, you can return JSON and draw on the client with JavaScript, an approach known as JAMStack. If the graph is static, you can return a PNG image.
Which web framework is right for me?
I have used every single one of these web frameworks. I know what each is good at.
Django: For big web apps. Includes SQL. Do not use for small web apps.
Flask: For quick and small web apps. Pair with SQLAlchemy for SQL.
SLS: For REST APIs. Do not use to build a web app.
Web.py: For small web apps. A worse version of flask.
Other Concerns
To host files that don’t change, you can use static files. Or can reverse proxy the web app with Apache and NGINX and have them serve static files under a different extension. Best of all, you can host it on a seperate domain with a CDN for maximum performance.