Skip to content

Repository files navigation

Weather Dashboard

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.


Features

  • 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

Technologies Used

  • Python 3
  • Tkinter
  • Requests
  • Pillow
  • OpenWeatherMap API
  • python-dotenv

Project Structure

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

Installation

Clone the repository.

git clone https://github.com/Piyushch15/weather-dashboard-python.git

Move into the project directory.

cd weather-dashboard-python

Install the required packages.

pip install -r requirements.txt

Create a .env file in the project root.

API_KEY=YOUR_OPENWEATHERMAP_API_KEY

Run the application.

python src/weather_Dashboard.py

Screenshots

Home Screen

Add screenshot here.

assets/screenshots/home.png

Weather Search

Add screenshot here.

assets/screenshots/weather-search.png

Rainy Weather

Add screenshot here.

assets/screenshots/rain.png

Demo

Record a short video demonstrating:

  • Launching the application
  • Searching multiple cities
  • Dynamic background changes
  • Error handling

Save it as:

assets/demo.mp4

Error Handling

The application handles the following cases:

  • Empty input
  • Invalid city name
  • Missing API key
  • Network connection failure
  • Request timeout

Future Improvements

  • Five-day weather forecast
  • Weather icons
  • Wind speed and pressure
  • Sunrise and sunset information
  • Dark mode
  • Search history
  • Automatic location detection

What I Learned

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

License

This project is licensed under the MIT License.


Author

Piyush Channote

GitHub: https://github.com/Piyushch15

LinkedIn: https://www.linkedin.com/in/piyush-channote-b733a930a

About

Desktop weather application built with Python, Tkinter, and OpenWeatherMap API providing real-time weather information for any city.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages