On Day 7, we transitioned to backend web development by diving into Flask—a lightweight Python web framework. We mapped how Flask serves as a bridge between the frontend HTML interfaces we built yesterday and the Python logic we learned in Week 1.
1. Flask Basics & Routing
We began by setting up basic Flask application environments, understanding the @app.route decorator, and launching local dev servers. We visualized the client-server relationship, comparing it to a restaurant where Flask acts as the waiter routing orders from the menu (HTML) to the kitchen (Python code).
2. Templates and Forms
To serve real web pages, we utilized the render_template function to connect our Flask backend to an index.html file in a templates folder. We then integrated HTML forms with POST requests, capturing user string inputs via the request object and passing them back to the frontend using Jinja templating tags ({{ message }}).
3. The Hugging Face Account & The 120k LOC Gap
A defining moment occurred when Rashmi announced we would use open-source models via Hugging Face. While my classmates struggled merely to create a Hugging Face account, I recalled opening mine years prior in 2024. Furthermore, when the class was overwhelmed by writing a 120-line Flask script, I silently reflected on having maintained projects scaling to 120,000 lines of code. This massive disparity validated my GOATed path: traditional learning paces at 100 lines, while true engineering scales exponentially.