A lightweight desktop weather widget for Windows built with Python + PyQt6.
It displays real-time weather for your city and sits neatly on your desktop like a native widget.
The widget automatically detects your location on first launch and updates the weather every 10 minutes.
• 🌍 Auto detect location on first launch
• 🌡️ Real-time weather updates
• 🔄 Automatic refresh every 10 minutes
• ☀️ Weather condition icons
• 🎨 Temperature color indicators
• 📌 Draggable floating desktop widget
• 🖥️ Always-on-top frameless UI
• ⚙️ System tray integration
• 🚀 Optional Start with Windows toggle
• 📍 Manual city selection
• 🔔 Weather update notifications
You can download the latest installer here:
After downloading:
- Run the installer
- Launch Weather Widget
- The widget will appear on your desktop
The widget:
- Detects your location using IP geolocation
- Fetches weather data from a secure serverless API
- Displays temperature, description, and weather icon
- Saves your city and widget position locally
Your settings are stored in:
LOCALAPPDATA/WeatherWidget/config.json
If running from source:
Python 3.9+
PyQt6
requests
Install dependencies:
pip install PyQt6 requestsClone the repository:
git clone https://github.com/TutorialsAndroid/weather-widget.git
cd weather-widgetRun:
python weather-widget.pyMain application file:
weather-widget.py
Source code:
Install PyInstaller:
pip install pyinstallerBuild executable:
pyinstaller --noconfirm --onefile --windowed --icon=weather.ico weather-widget.pyThe executable will appear in:
dist/weather-widget.exe
Example script:
[Setup]
AppName=Weather Widget
AppVersion=1.0
DefaultDirName={pf}\WeatherWidget
DefaultGroupName=WeatherWidget
OutputDir=.
OutputBaseFilename=WeatherWidgetInstaller
[Files]
Source: "dist\weather-widget.exe"; DestDir: "{app}"
[Icons]
Name: "{group}\Weather Widget"; Filename: "{app}\weather-widget.exe"Compile with Inno Setup Compiler.
Right-click or click the ⋮ menu to access:
Refresh
Auto Detect Location
Change City
Start with Windows
Exit
The OpenWeather API key is not included in this repository.
Weather requests are proxied through a serverless API to prevent key exposure.
MIT License
Copyright (c) 2026 Akshay
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Built with ❤️ using Python + PyQt6