A Python-based weather application using Tkinter GUI and the Open-Meteo API with integrated auto-update functionality.
- 🌍 City name to coordinates conversion using geopy/Nominatim
- 🌤️ Real-time weather data from Open-Meteo API
- 🔄 Automatic update checking and installation
- 🛡️ Comprehensive error handling
- 🎨 User-friendly GUI with dark theme
- 📊 Detailed weather information display with emoji icons
- ⚡ Fast startup with ONEDIR build
- ⌨️ Enter key support for quick weather lookup
- Download
Weather_Installer.exefrom the latest release - Run the installer
- Choose installation location
- Click "Install"
- The installer will:
- Download the latest version
- Create desktop shortcut
- Set up auto-update functionality
- Download
Weather.zipfrom the latest release - Extract to your preferred location
- Run
Weather.exe
- Clone the repository:
git clone https://github.com/Rog294super/Weather-App.git
cd Weather-App- Install dependencies:
pip install -r requirements.txt- Run the application:
python Weather.py- Enter a city name (e.g., "Amsterdam" or "Amsterdam, Netherlands")
- Click "Fetch Weather" or press Enter
- View detailed weather information with emoji indicators
The application includes a built-in update system:
- Automatic check: Checks for updates on startup (background)
- Manual check: Click "🔄 Check Updates" button
- One-click install: Automatically downloads and installs updates
- Seamless restart: Application restarts after update
The update process uses a C++ updater (updater.exe) that:
- Closes the running application
- Downloads the new version
- Replaces the old executable
- Restarts the application
- Python 3.8+
- PyInstaller:
pip install pyinstaller - C++ compiler (for updater): MinGW-w64 or Visual Studio
- Build the application:
compiler.batChoose from:
- Option 1: ONEDIR (Instant Startup) - Recommended
- Option 2: Installer
- Option 3: Build both
- Option 4: Clean build folders
- Build the updater (if needed):
cd Updater
compile_updater.batThe ONEDIR build creates a folder structure with instant startup (<0.5s) instead of a single large executable.
Weather/
├── Weather.py # Main application
├── file_handler.py # File operations utility
├── weather_installer.py # Online installer
├── Weather.spec # PyInstaller spec for main app
├── Weather_Installer.spec # PyInstaller spec for installer
├── compiler.bat # Build automation script
├── requirements.txt # Python dependencies
├── README.md # This file
├── LICENSE # MIT License
└── Updater/
├── updater_final.cpp # C++ updater source
├── compile_updater.bat # Updater build script
└── test_update.bat # Update testing script
- API: Open-Meteo (free, no API key required)
- Data includes: Temperature, humidity, wind, precipitation, cloud cover
- Weather codes: Translated to human-readable descriptions with emoji icons
- Service: Nominatim (OpenStreetMap)
- Features: City name → coordinates conversion
- Timeout handling: 10-second timeout with retry logic
- ✅ Network timeout handling
- ✅ Invalid location handling
- ✅ API error handling
- ✅ Geocoding service errors
- ✅ Update system errors
- ✅ Comprehensive logging
Weather.exe
↓ (checks GitHub API)
↓ (new version available)
↓ (launches)
updater.exe <download_url> <target_path>
↓ (closes Weather.exe)
↓ (downloads new version)
↓ (replaces old executable)
↓ (restarts Weather.exe)
- ✅ Automatic update checking on startup
- ✅ Manual update check button
- ✅ One-click update installation
- ✅ Progress indicators during update
- ✅ Automatic restart after update
- ✅ Version display in header
- ✅ Update button with status indication
- ✅ Better weather formatting with emojis
- ✅ Enter key support
- ✅ Improved error messages
- ✅ Excludes build artifacts
- ✅ Excludes user-specific files
- ✅ Excludes IDE files
- ✅ Keeps source files tracked
- ✅ UpdateManager class for update logic
- ✅ Better separation of concerns
- ✅ Improved error handling
- ✅ Better logging throughout
- "Updater not found": Reinstall the application using the installer
- Update fails: Try manual download from GitHub releases
- Application doesn't restart: Manually start Weather.exe
- "Geocoding service timed out": Check internet connection, try again
- "Could not find location": Try adding country name (e.g., "Paris, France")
- "Weather API error": Service may be temporarily unavailable
- Application won't start: Check Windows Defender/antivirus settings
- Slow startup: Use ONEDIR version from installer
- Missing icon: Icon.ico file may be missing (optional, won't affect functionality)
cd Updater
test_update.batThis simulates the update process without affecting the live application.
- Update VERSION in Weather.py
- Build with
compiler.bat(option 3 - build all) - Create GitHub release with tag (e.g., v1.0.1)
- Upload:
dist/Weather.zip(manual installation)dist/Weather_Installer.exe(auto-installer)Updater/updater.exe(required for auto-update)
MIT License - see LICENSE file for details
Rog294super
- GitHub: @Rog294super
- Open-Meteo - Free weather API
- Nominatim - Free geocoding service
- geopy - Geocoding library
- PyInstaller - Python to executable conversion
- Initial release
- Basic weather fetching
- City to coordinates conversion
- Dark theme GUI
- Integrated auto-update system
- ONEDIR instant startup build
- Enhanced UI with emojis
- Enter key support
- Update checking and installation