Weather App
This is a simple Python script to fetch and display the current weather for a specified city using the OpenWeatherMap API.
🗒️ Description
The script takes a city name as input and retrieves the current weather information, including the weather description and temperature in Celsius. It handles various exceptions that may occur during the API request.
Requirements
- Python 3.x
requestslibrary
Installation
- Clone this repository to your local machine:
git clone https://github.com/ShravanDalavi/Simple-Python-Mini-Projects.git
- Navigate to the project directory:
cd Simple-Python-Mini-Projects/Weather\ App
- Install the required Python modules:
Usage
- Obtain an API key from OpenWeatherMap.
- Open the
weather_app.pyfile and replace the placeholder API key (afe72a4da5b0392c920e53f98a0b7907) with your actual API key. - Run the script:
- Enter the city name when prompted to get the weather information.
Example
$ python weather_app.py
Enter the city name: London
Weather in London: clear sky
Temperature: 15°C