Skip to content

Koushik106/Weather-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌦️ PyQt5 Weather App

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.


✨ Features

  • Real-time Weather — Live temperature, conditions, and atmospheric data via OpenWeatherMap
  • Secure API Handling — Uses python-dotenv and .env files 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

📸 Preview

A centered layout with large, readable typography and a custom bg.png background.

Screenshot 2026-03-04 002055

Floating window layout

Screenshot 2026-03-04 002105

📥 For Users: Running the .exe

  1. Get an API Key — Sign up at openweathermap.org and generate a free API key
  2. Open the .env file in the app folder using any text editor (e.g. Notepad)
  3. Add your key:
    API_KEY=your_key_here
    
  4. Launch — Make sure bg.png, cloudy.png, and .env are in the same folder as Weather_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 .exe is not code-signed (which requires a paid certificate). To bypass: click "More info" → then "Run anyway". The app is completely safe.


🚀 For Developers: Running from Source

Prerequisites

Python 3.10+ is required. Install dependencies with:

pip install -r requirements.txt

Installation

  1. Clone the repository:

    git clone https://github.com/Koushik106/Weather-App.git
    cd Weather-App
  2. Configure environment — Create a .env file in the project root:

    API_KEY=your_key_here
    
  3. Run the app:

    python weather_app.py

🗂️ Project Structure

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

🛠️ Credits & Acknowledgments

Built as part of my journey learning GUI development and API integration.

  • Foundation — Inspired by Bro Code on YouTube
  • My Contributions:
    • 🔐 Security — Implemented .env vaulting 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 .exe packaging

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages