This repository contains a simple Weather application built using Python, tkinter, and the OpenWeather API. The app lets you search for a city and displays current weather plus a 5-day forecast, you can also click a day to view the forecast in 3-hour intervals.
The Weather App provides a GUI where you can:
- Search a location by name
- View current conditions (temperature, humidity, wind, visibility, sunrise, sunset, chance of rain)
- View a 5-day forecast
- Click a forecast day to open a detailed screen with 3-hour interval data
- Move between forecast days using Next Day, Previous Day buttons
-
Current Weather
- Temperature
- Condition description and icon
- Humidity
- Wind speed
- Visibility
- Min and max temperature
- Sunrise and sunset
- Chance of rain (when available)
-
5-Day Forecast
- Forecast cards for the next 5 days
- Weather icons and midday temperatures
-
Detailed Forecast View
- 3-hour interval breakdown for a selected day
- Navigation between available forecast days
- Python 3.x
tkinter(usually comes pre-installed with Python)- OpenWeather API key (free tier is enough)
Python packages (installed via requirements.txt):
requestspython-dotenvPillow
- Clone the repository
git clone https://github.com/Myszanik/WeatherApp.git
- Navigate to the Project Directory:
cd WeatherApp
- Create a virtual environment (recommended):
python -m venv .venv.\.venv\Scripts\Activate.ps1
- Install Dependencies:
python -m pip install -r requirements.txt
- Add your OpenWeather API key:
- Create a file named
.envin the same folder asWeatherApp.py, then put this line inside it
api_key=YOUR_OPENWEATHER_API_KEY - Create a file named
- Run the Application:
python WeatherApp.py
- The
.envfile is intentionally not included in the repository, each user must create their own to run the app. - If you make the repo public, your API key stays safe as long as
.envis not committed.
tkinter, for the GUI- OpenWeather API, for weather data
requests, for HTTP requestspython-dotenv, for loading environment variables from .envPillow, for displaying weather icons
This project is for learning and practice. Improvements and clean-ups are welcome.

