Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 986 Bytes

File metadata and controls

32 lines (20 loc) · 986 Bytes

Weather-Notification-Bot

A small Python script that fetches today's hourly temperature forecast from the Open-Meteo API and sends a desktop notification with the day's average and high temperature.

How it works

  • Pulls hourly temperature data for a fixed location (Calgary, AB) for the current day.
  • Averages the daytime hours (8am–11pm) to compute an average temperature.
  • Finds the high temperature from the full hourly forecast.
  • Displays both in a desktop notification via plyer.

Requirements

  • Python 3
  • requests
  • plyer

Setup

Create and activate a virtual environment, then install the dependencies.

  1. Create the venv: python -m venv venv
  2. Activate it (Windows PowerShell): .\venv\Scripts\Activate.ps1
  3. Install dependencies: pip install -r requirements.txt

Usage

Run with: python main.py

Notes

This was a small project built after finishing CS50 to practice working with APIs and classes in Python.