A clean, modern desktop weather application built with PyQt5 that fetches current weather data and 5-day forecasts using OpenWeatherMap's API.
This app provides real-time weather information with dynamic backgrounds, custom icons, and user authentication, designed entirely for a smooth desktop experience.
Follow these steps to set up the weather application locally.
| What you need | Where to get it |
|---|---|
| Python 3.7+ | python.org |
| Git | Already on your machine |
Steps:
-
Clone the repository:
git clone https://github.com/Huerte/weather-forecast-pyqt5.git cd weather-forecast-pyqt5 -
Create a Virtual Environment (Optional but recommended):
python -m venv venv source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Application: Navigate to the
srcdirectory and run:cd src python main.py
| Feature | What it means |
|---|---|
| GUI-based Search | Easily search for weather by typing a city name. |
| Current Weather Data | Displays real-time temperature, humidity, pressure, and more. |
| 5-Day Forecast | Provides detailed forecast data along with weather icons. |
| Dynamic Backgrounds | The application background changes automatically based on the current weather condition. |
| User Authentication | Sign up and log in using a local database to personalize your experience. |
| Custom Visuals | Features custom icon themes and graceful loading animations. |
This application relies on the OpenWeatherMap API for data fetching.
- Current Weather API: https://openweathermap.org/current
- 5 Day / 3 Hour Forecast API: https://openweathermap.org/forecast5
Note: The API key is already integrated in the source code.
- Launch the app — Navigate to the
srcdirectory and runpython main.py. - Authenticate — Sign up and log in to access the application.
- Search — Start typing a city name to get real-time weather info.
- Interact — Watch the weather backgrounds and icons change based on the forecast. Error messages and loading states are handled gracefully.
Contributions are welcome. Here is how to go from zero to a submitted pull request.
Prerequisites: Python 3.7+ and Git.
Fork and clone:
# 1. Fork the repo on GitHub, then clone your fork
git clone https://github.com/YOUR_USERNAME/weather-forecast-pyqt5.git
cd weather-forecast-pyqt5
# 2. Keep your fork in sync with the original
git remote add upstream https://github.com/Huerte/weather-forecast-pyqt5.git
Branch naming:
feat/short-description # New features
fix/short-description # Bug fixes
docs/short-description # Documentation only
chore/short-description # Maintenance or refactoring
Commit messages: Use plain English. Describe what changed and why:
# Good
git commit -m "fix: resolve rendering issue with dynamic backgrounds"
git commit -m "feat: add wind speed to current weather data"
git commit -m "docs: clarify virtual environment setup in README"
# Avoid
git commit -m "fix stuff"
git commit -m "update"
Code style:
- Follow the existing PyQt5 class structures.
- Keep functions short. If something is growing, split it.
- Add a comment when the purpose of something is not immediately obvious.
- Never swallow exceptions silently.
-
Push your branch to your fork:
git push origin feat/your-feature -
Open a Pull Request against
Huerte/weather-forecast-pyqt5:mainon GitHub. -
In the PR description, briefly explain: what you changed, why, and how to test it.
-
If your change affects the app's output or behavior, update this README accordingly.
Distributed under the MIT License. See LICENSE for details.
Built to provide accurate and beautiful desktop weather forecasts.


