Live Weather Notifications Using Python
Live Weather Notifications Using Python
Python
We all check for weather updates, especially when we want to go outside.
Wouldn’t it be more comfortable to get the notifications rather than checking
them ourselves? Yes! We will be building a Python project that sends live
weather reports as desktop notifications.
Project Structure
We will follow the below steps to build python weather alert project.
1. Importing modules
2. Creating a GUI and adding required components
3. Writing a function to get notification
Simple steps right? Now, let’s dive into the coding part.
1. Importing modules
#importing modules
import time
from tkinter import *
from tkinter import messagebox as mb
import requests
from plyer import notification
Code explanation:
a. In this step, we import the above discussed 4 modules
b. The message box helps in showing pop up message in case any error
occurred