What is it used to do??
# Web Site Writing Basics # Pythonprogramming # flask
# Web Site Writing Basics# pythonprogramming # flask _ framework # Lemon8 Howtoo
Flask is a small Web Framework written in Python. It is designed to be "simple" and "highly flexible" so that you can quickly create a website or API without using too complex code.
In the context of the Peemai Shop project you are working on, Flask serves as the following:
1. The main function of Flask (The Engineer)
Flask is like the "engine" of a website that manages the backend:
Routing (Routing): Please tell us that if the customer opens the page / list or if you go to the page / contact, display the contact information.
Template Rendering: Put the retrieved product data into an HTML file (which you composed with Bootstrap 5) to create a beautiful web page for customers to see.
Request Handling: Receive a request from the client's browser and send back a response
2.Flask's role in connecting Google Sheets
Compared to your work now, Flask is the "coordinator," sir:
Retrieve: Flask uses Library requests. Run to Google Apps Script to request product information in JSON format.
Processing: Flask Get JSON to unpack what products are available (using the resulting command .get ("data") we talked about earlier).
Forward: Flask sends that item list to the display screen.
3. Why is Flask suitable for your project?
Minimalism: You can start writing only a few lines in app.py the web and run. Unlike a big Django framework, it needs a lot of settings.
Control: You can easily write a Logic in Python, such as "If a product does not have an image, use a backup image."
Vercel Support: Flask fits very well with Deploy on Vercel, allowing you to open a free and stable online store.
📊 Overview summary
To compare the creation of the web to the opening of the Peemai Shop:
Google Sheets: is a stock warehouse (Database)
Google Apps Script: It's an employee who lifts goods and sends them (API)
Flask: The "store manager" who takes orders, organizes items into the showcase and takes care of all neatness.
HTML / Bootstrap: is the display case and store face that customers can see.
Simply put: Without Flask, the data in your Google Sheets is just a dry table of numbers.


































































