https://github.com/ksganni/weather-app-using-python
๐ฆ๏ธ A simple Python desktop app using tkinter that displays live weather info for any city via the OpenWeatherMap API.
https://github.com/ksganni/weather-app-using-python
openweathermap-api python python-dotenv requests tkinter-gui
Last synced: 15 days ago
JSON representation
๐ฆ๏ธ A simple Python desktop app using tkinter that displays live weather info for any city via the OpenWeatherMap API.
- Host: GitHub
- URL: https://github.com/ksganni/weather-app-using-python
- Owner: ksganni
- License: mit
- Created: 2025-08-01T23:17:56.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-01T23:47:29.000Z (9 months ago)
- Last Synced: 2025-08-02T00:36:36.354Z (9 months ago)
- Topics: openweathermap-api, python, python-dotenv, requests, tkinter-gui
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ฆ๏ธ Weather App in Python (tkinter + OpenWeatherMap API)
A beginner-friendly desktop GUI application built in Python using **tkinter** that shows **live weather information** (temperature, description, and wind speed) based on **city input** using the **OpenWeatherMap API**.
---
## ๐ Features
- ๐ก๏ธ Real-time weather data (temperature, weather description, wind speed)
- ๐ฅ๏ธ tkinter-based GUI
- โ ๏ธ API error handling (invalid city, no input, internet errors)
---
## ๐ท Screenshots

---
## ๐ฅ Demo Video
https://github.com/user-attachments/assets/0669542f-814f-4560-aa88-b854f5c8239d
---
## ๐ ๏ธ Tech Stack
- Python
- tkinter (standard GUI library)
- OpenWeatherMap API
- requests
- python-dotenv
---
## ๐ Project Structure
```
weather_app/
โ
โโโ main.py # Main app code
โโโ .env # Stored API key ( not pushed to Github repo )
โโโ .gitignore # Hides files
โโโ requirements.txt # Project dependencies
โโโ README.md # This file
```
---
## โ๏ธ Setup Instructions
### 1๏ธโฃ Clone the Repository
```bash
git clone https://github.com/yourusername/weather_app.git
cd weather_app
```
### 2๏ธโฃ Create Virtual Environment
๐น **Windows:**
```bash
python -m venv venv
venv\Scripts\activate
```
๐น **macOS/Linux:**
```bash
python3 -m venv venv
source venv/bin/activate
```
### 3๏ธโฃ Install Dependencies
```bash
pip install -r requirements.txt
```
### 4๏ธโฃ Get Your API Key
1. Go to [OpenWeatherMap API](https://openweathermap.org/api)
2. Sign up for a free account
3. Copy your API key from the **"API Keys"** section
### 5๏ธโฃ Add API Key to `.env` File
Create a `.env` file in the root of your project and add:
```ini
OPENWEATHER_API_KEY=your_api_key_here
```
๐ **Never share this file or commit it to GitHub**
### 6๏ธโฃ Run the App
```bash
python main.py
```
---
## ๐งช How to Use
1. Launch the app
2. Enter a **city name** (e.g., `London`)
3. Click the **"Get Weather"** button
4. View the temperature, weather condition, and wind speed
---