This Python script fetches real-time weather for multiple cities using the free Open-Meteo API, displaying temperature, wind speed, and direction in a terminal dashboard.
- 🔁 Automatically updates weather at your chosen interval
- 🌍 Supports any number of locations (just add latitude & longitude)
- 🔌 No API key required
- 💻 Simple command-line interface
📊 Weather Dashboard (Live)
-----------------------------------
📍 Salepur (20.3869, 86.1318)
🌡️ Temp: 33.1°C
💨 Wind: 10.2 km/h
🧭 Dir: 170°
📍 Cuttack (20.4625, 85.8828)
🌡️ Temp: 34.4°C
💨 Wind: 11.7 km/h
🧭 Dir: 150°
-----------------------------------
- Clone or Download the script:
git clone https://github.com/your-username/weather-dashboard
cd weather-dashboard- Install dependencies (only
requestsis required):
pip install requests- Run the script:
python weather_dashboard.py- Enter the update interval (e.g.,
5for every 5 minutes)
Edit the locations list in the script:
locations = [
{"name": "Your City", "lat": XX.XXXX, "lon": YY.YYYY}
]Use Google Maps or latlong.net to find coordinates.
- Python 3.x
- requests
- Open-Meteo: A free, no-auth weather API with real-time data.
- Save output to CSV
- Add color formatting
- Build a GUI version with Tkinter or PyQt
- Add hourly/weekly forecast
Made with ❤️ by CodeWithPython