A simple command-line weather application that fetches real-time weather data for any city using the OpenWeatherMap API.
- Real-time weather information for any city worldwide
- Displays temperature in Celsius
- Shows weather description, humidity, and wind speed
- Formatted output with current date and time
- Simple and intuitive command-line interface
- Python 3.x
- Requests Library - For API calls
- OpenWeatherMap API - Weather data source
-
Clone or download this repository
-
Install required dependencies:
pip install requests
-
Get your free API key from OpenWeatherMap
-
Replace the
api_keyin the code with your own API key
Run the script and enter any city name when prompted:
python weather_app.pyExample Output:
Enter the city name: London
----------------------------------------------------------------
Weather Stats for -LONDON || 16 Oct 2025 | 02:30:45 PM
----------------------------------------------------------------
Current temperature is: 18.50 deg C
Current weather desc : light rain
Current Humidity : 72 %
Current wind speed : 5.2 kmph
- Temperature - Converted from Kelvin to Celsius
- Weather Description - Current weather conditions
- Humidity - Percentage of moisture in air
- Wind Speed - Wind speed in km/h
- Date & Time - Local timestamp of query
Make sure to keep your API key secure and don't share it publicly. Consider using environment variables for better security.
This project is open source and available for personal and educational use.
Rohan Goyal
- GitHub: @RohanGoyal37
⭐ If you find this helpful, consider giving it a star!