There are many frameworks that allow building your webpage using Python, like Django, flask, etc. Flask is a web application framework written in Python. Flask is based on WSGI(Web Server Gateway Interface) toolkit and Jinja2 template engine. Its modules and libraries that help the developer to write applications without writing the low-level codes such as protocols, thread management, etc.
In this article, we will learn how to make a todo list app using the Flask framework. In this app, you can add your todo items and mark them as complete or incomplete.
pip install Flask
Basic setup :
Step 1: First make basic folders
mkdir app && cd app && mkdir static && mkdir templates
Step 2: Make some basic python files to write the code and name it as you desire.
Step 3: Run the below command to start the server
touch run.py the app
Step 4: Change directory to app–
Step 5: create models.py for database, routes.py for urls/views and __init__ file to package our app
touch models.py routes.py __init__.py
Step 6: Goto templates/ directory and create index.html file
cd templates && touch index.html
Step 7: Goto static/ directory and create main.css
cd static && touch main.css
Now, open the project folder using a text editor. The directory structure should look like this :
Run the todo app using the below command
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Create a Weather app using Flask | Python
- Deploy Python Flask App on Heroku
- Dockerize your Flask App
- Flask project - Create a Joke App with PyJokes
- Python | ToDo webapp using Django
- Python | ToDo GUI Application using Tkinter
- Python | Using for loop in Flask
- Python | Introduction to Web development using Flask
- Python | Build a REST API using Flask
- Profile Application using Python Flask and MySQL
- Setup API for GeeksforGeeks user data using WebScraping and Flask
- Deploy Machine Learning Model using Flask
- Sending Emails Using API in Flask-Mail
- Using JWT for user authentication in Flask
- Retrieving HTML From data using Flask
- Login and Registration Project Using Flask and MySQL
- Subdomain in Flask | Python
- Flask - (Creating first simple application)
- Deploying a TensorFlow 2.1 CNN model on the web with Flask
- Setting up Google Cloud SQL with Flask
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : itsvinayak