A python script which displays weather data of the location given by the user as a desktop notification
requests
notify-py
Make an account on OpenWeather for the weather API and KEY
You will need to install python on you system, head over to this link: https://www.python.org/downloads/ for download python
(Dont forget to tick Add Python to PATH while installing python)
Once you have downloaded Python on your system, run the following command inside your terminal (only if your system is git enabled, otherwise download the zip file and extract it)
git clone https://github.com/milan-sony/weather_forecast.git
Then go to the project folder
cd weather_forecast
(This is optional, but strongly recommended) Make a virtual environment
python -m venv venv
Then activate the virtual environment
venv/Scripts/activate
If error occurs when activating virtual environment, run the following command
Set-ExecutionPolicy Unrestricted
or
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
Install the dependencies needed for this project
pip install -r requirements.txt
Now paste your OpenWeather API KEY inside the secret.py
file
Then run the script
python main.py
When you run the script it will ask your location (Please try to give a major city name as your location), then it will check whether that given location is available on not on OpenWeather
It the location is found, it will make a popup windows notification for each 15 min showing the current weather details of the location you have given
You can change the notification details, Weather API and all as per your need
There may be some faults while running the program (If any error occurs exit the code ctrl + c
and run again python main.py
)
- Add weather alerts
- Make the program run on background
- WebApp