This is a simple weather forecasting tool that uses the OpenWeatherMap API to retrieve weather data for a given city using Python. The tool displays current weather conditions, as well as the upcoming weather of the day in a 3 hour interval basis.
To install the tool, simply clone the repository and run the following command in the terminal:
# Warning: Make sure to have Python installed on your system.
py weather.py <cityname>
Make sure to have the following libraries installed:
pip install requests
or
py -m pip install requests
To use the tool, simply enter the name of the city you wish to retrieve weather data for. The tool will then display the current weather conditions, as well as the forecast for the rest of the day.
py weather.py <cityname>
This tool can be used to retrieve weather data for any city in the world. It can be used to plan trips, or to simply check the weather in your area.
- OpenWeatherMap API to retrieve weather data for a given city.
- Requests library to make HTTP requests to the OpenWeatherMap API.
- JSON library to parse the JSON data retrieved from the OpenWeatherMap API.
- Datetime library to convert the UNIX timestamp to a readable date and time.
- Sys library to retrieve the city name from the command line arguments.
- Github Copilot to help with the code.