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