A sleek, secure, and standalone desktop weather application built with Python and PyQt5. Fetches real-time weather data from the OpenWeatherMap API, with custom UI styling, dynamic icons, and secure environment configuration.
- Real-time Weather — Live temperature, conditions, and atmospheric data via OpenWeatherMap
- Secure API Handling — Uses
python-dotenvand.envfiles to keep API keys out of version control - Custom UI — Styled with Qt Style Sheets (QSS), featuring a custom background (
bg.png) and high-resolution weather emojis - Robust Error Handling — Gracefully handles invalid cities, network timeouts, and missing API keys
- Standalone Distribution — Packaged as a single
.exe— no Python installation required
A centered layout with large, readable typography and a custom
bg.pngbackground.
Floating window layout
- Get an API Key — Sign up at openweathermap.org and generate a free API key
- Open the
.envfile in the app folder using any text editor (e.g. Notepad) - Add your key:
API_KEY=your_key_here - Launch — Make sure
bg.png,cloudy.png, and.envare in the same folder asWeather_app.exe, then double-click to run
⚠️ Windows SmartScreen Warning You may see a popup saying "Windows protected your PC" or "This app might be a virus." This is a false positive — it happens because the.exeis not code-signed (which requires a paid certificate). To bypass: click "More info" → then "Run anyway". The app is completely safe.
Python 3.10+ is required. Install dependencies with:
pip install -r requirements.txt-
Clone the repository:
git clone https://github.com/Koushik106/Weather-App.git cd Weather-App -
Configure environment — Create a
.envfile in the project root:API_KEY=your_key_here -
Run the app:
python weather_app.py
weather-app/
├── weather_app.py # Main application entry point
├── bg.png # Background image asset
├── cloudy.png # Default weather icon
├── .env # API key (not tracked by Git)
├── .gitignore
├── requirements.txt
└── README.md
Built as part of my journey learning GUI development and API integration.
- Foundation — Inspired by Bro Code on YouTube
- My Contributions:
- 🔐 Security — Implemented
.envvaulting to protect API credentials - 🎨 UI/UX — Added custom branding, window icons, and background image support
- 🛡️ Resilience — Expanded error handling for better user feedback
- 📦 Deployment — Configured PyInstaller for standalone
.exepackaging
- 🔐 Security — Implemented