This is a simple weather forecast application that allows users to retrieve current weather information by inputting the country and city of their choice. The app utilizes the OpenWeatherMap API to fetch weather data, which includes temperature, description, humidity, sunrise time, and sunset time. The retrieved data is displayed in a visually appealing format with temperature conversion to Celsius and Fahrenheit and local time display for sunrise and sunset.
- Input country and city to fetch weather information
- Display weather description, temperature, feels-like temperature, humidity, sunrise time, and sunset time
- Temperature displayed in both Celsius and Fahrenheit
- Local time display for sunrise and sunset
- Python
- Requests library for making HTTP requests
- OpenWeatherMap API for weather data retrieval
- Clone the repository to your local machine.
- Install the required dependencies (requests library).
- Run the
weather_forecast.py
script. - Follow the prompts to input the country and city.
- View the weather information displayed in the console.
To use the OpenWeatherMap API, you will need to sign up on their website to obtain an API key. Once you have the API key, replace the API_KEY
variable in the weather_forecast.py
script with your own API key.
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.