A simple command-line weather application that fetches current weather data for multiple cities using the OpenWeatherMap API. Users can choose between metric (Celsius) and imperial (Fahrenheit) units for temperature.
- Fetch current weather data for multiple cities at once. 🌍
- Choose between Celsius and Fahrenheit for temperature units. 🌡️
- Display temperature, humidity, wind speed, and weather description. 💨
- Python 3.x
requestslibrary (install usingpip install requests)
-
Clone the repository:
git clone https://github.com/t3hj/WeatherApp.git cd WeatherApp -
Install required libraries: Ensure you have the
requestslibrary installed:pip install requests
-
API Key:
- Sign up for an account at OpenWeatherMap and obtain your API key. 🔑
- Replace the placeholder API key in the script with your valid API key:
API_KEY = 'your_api_key_here' # Ensure this is valid
-
Run the application:
python main.py
-
Follow the prompts:
- Choose the temperature unit (
Cfor Celsius,Ffor Fahrenheit). 🌡️ - Enter city names separated by commas (e.g.,
London,Paris,New York). 🌆
- Choose the temperature unit (
-
View the weather information displayed for each city. 📊
If you'd like to contribute to this project, please fork the repository and create a pull request with your changes.
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenWeatherMap for providing the weather API.
