This Python script makes a request to the OpenWeatherMap API and outputs the current temperature and weather conditions for a specified latitude and longitude.
- Download or clone the repository using
git clone
. - Ensure that you have Python 3.x installed.
- Install the required Python modules using the command
pip install -r requirements.txt
. - Add your OpenWeatherMap API keys to the
.env
file. - Run the script using the command
python main.py
.
- You can obtain an API key from OpenWeatherMap by registering on the OpenWeatherMap website and creating an account.
- Save your API key in the
.env
file as theAPI_KEY
variable.
- Run the script using the command
python main.py
. - The script will output the current temperature and weather conditions for the specified latitude and longitude.
- If the request is successful, the script will output the data. Otherwise, an error message will be displayed.
This script was created by Snasy and is licensed under the MIT License.