This project is a simple Python based weather app that provides User with current weather information in the given location. Reading the source code of this project will show you the following:
- How to use APIs with Python using requests module
- How to read/write JSON data in Python
- How to use eel for a GUI
- Easy to replicate HTML code for a GUI
- Simple JavaScript file to connect Python back-end with the HTML front-end
- Pretty CSS styling
Pretty easy! The User is asked for an input on start, this input will act as a location for which we will make an API request here: https://api.weatherapi.com/v1/current.json, we will also send a payload that will contain our API key and the location. After we get our response and it's valid (status_code == 200) we will read the JSON response that we got and get the city, country, temperature etc. for a GUI display. Then the JS file that is triggered on button press will just change the innerHTML of the weatherDisplay div in our index.html and display values that we got.
Screenshots: