A desktop weather application built using Python, Tkinter, and the OpenWeatherMap API. The application allows users to search for any city and view real-time weather information, including temperature, humidity, and weather conditions. The background image changes dynamically based on the current weather.
- Search weather by city name
- Display current temperature
- Display humidity
- Display weather description
- Dynamic background based on weather conditions
- Error handling for invalid city names
- API key secured using
.env - Press Enter to search
- Python 3
- Tkinter
- Requests
- Pillow
- OpenWeatherMap API
- python-dotenv
weather-dashboard-python/
│
├── assets/
│ ├── images/
│ └── screenshots/
│
├── docs/
│ └── usage.md
│
├── src/
│ └── weather_Dashboard.py
│
├── .github/
│
├── .env.example
├── .gitignore
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
└── requirements.txt
Clone the repository.
git clone https://github.com/Piyushch15/weather-dashboard-python.gitMove into the project directory.
cd weather-dashboard-pythonInstall the required packages.
pip install -r requirements.txtCreate a .env file in the project root.
API_KEY=YOUR_OPENWEATHERMAP_API_KEYRun the application.
python src/weather_Dashboard.pyAdd screenshot here.
assets/screenshots/home.png
Add screenshot here.
assets/screenshots/weather-search.png
Add screenshot here.
assets/screenshots/rain.png
Record a short video demonstrating:
- Launching the application
- Searching multiple cities
- Dynamic background changes
- Error handling
Save it as:
assets/demo.mp4
The application handles the following cases:
- Empty input
- Invalid city name
- Missing API key
- Network connection failure
- Request timeout
- Five-day weather forecast
- Weather icons
- Wind speed and pressure
- Sunrise and sunset information
- Dark mode
- Search history
- Automatic location detection
This project helped me gain practical experience with:
- Working with REST APIs
- Handling JSON responses
- Building desktop GUI applications using Tkinter
- Managing API keys securely with environment variables
- Organizing a Python project for GitHub
This project is licensed under the MIT License.
Piyush Channote
GitHub: https://github.com/Piyushch15
LinkedIn: https://www.linkedin.com/in/piyush-channote-b733a930a