A data scientist's guide to production web apps with Flask
summary
Practical checklist: precompute feeds in a MySQL RDS table rather than running models at request time when the parameter space is bounded; use Flask-SQLAlchemy to manage DB connections and a tiny params table with current_date to avoid downtime during data updates; front Flask with Gunicorn + Docker + AWS ECS, tune workers and timeouts, add Redis caching, and build pagination with offset/limit. Enforce URI limits (~2000 chars use POST), return 400 for bad queries and 200 with empty lists when queries are valid but yield nothing, and avoid runtime joins—prejoin and index instead.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 5:19Flask for data science APIs
- 9:55Building Flask API
- 17:43Query complexity with filters
- 22:20HTTP errors handling
- 25:11Latency and DB optimization
- 29:02Documentation and monitoring
- 30:12Q&A
related talks
01h 19mDatascience on the web
47mReal World Django Q&A
39mA scalable blueprint for product customization with Python 3
47mBuilding Scalable Web Apps
33mWhen a little web app needs to grow up... the journey from a hobby project to production
43mMake Your Python Web App Fly Around the World with CDNs
38mData Secrets from a Platform Engineer
01h 18mBuild Data Apps by Deploying ML Models as API Services
