Create a Weather app using Flask | Python
Prerequisite : Flask installation
Flask is a lightweight framework written in Python. It is lightweight because it does not require particular tools or libraries and allow rapid web development. today we will create a weather app using flask as a web framework. this weather web app will provide current weather updates of cities searched.
Basic setup :
Create a file and name it as weather.py
Linux command to create a file
Now, create a folder templates with a file name
Linux command to create a folder and a file
mkdir templates && cd templates && touch index.html
The project folder will look like :
Editing files :
Use your own API key from Weather API and place it in API variable. Now edit
Navigate to templates/index.html and edit it: link to the index file.
Now you can run the server to see the weather app –
Please Login to comment...