diff --git a/Python/get_weather.py b/Python/get_weather.py new file mode 100644 index 0000000..5b52ef7 --- /dev/null +++ b/Python/get_weather.py @@ -0,0 +1,6 @@ +import requests +def get_weather(city): + api_key = "YOUR_API_KEY" + url = f"http://api.openweathermap.org/data/2.5/weather?q={city}&appid={api_key}" + response = requests.get(url) + return response.json()