Flask CRUD Web App Tutorial (Beginner Guide)
What is Flask?
- Flask is a lightweight Python web framework.
- Used for building web applications quickly with minimal code.
- Great for beginners, APIs, and small to medium web apps.
Project Goal
We will build a simple CRUD web app using Flask.
Features:
- Add users
- View user list
- Update user names
- Delete users
Project Structure
flask_crud_app/
|-- app.py
|-- templates/
| |-- index.html
|-- static/
|-- style.css (optional)
Step 1: Install Flask
Run this command in terminal:
pip install Flask
Step 2: Create app.py
This is the main Python file where we will define routes and logic.
[Python code example will be added here]
Step 3: Create templates/index.html
Basic HTML file to display the user list and forms.
[HTML code example will be added here]
Step 4: Run the App
In terminal:
python app.py
Then visit: http://127.0.0.1:5000/
Project Recap
- Set up Flask project
- Created CRUD operations
- Used basic HTML forms
- Learned routing and request handling in Flask
Next Steps
- Add SQLite database for storage
- Add user login/authentication
- Deploy the app online
Useful Resources
Flask Documentation: https://flask.palletsprojects.com/
Bootstrap Docs: https://getbootstrap.com/docs/5.3/
Thank You!
If you found this useful, subscribe to my YouTube channel for more tutorials.
Socials
GitHub: https://github.com/YourGitHub
LinkedIn: https://linkedin.com/in/YourLinkedIn