import requests import json def get_current_weather(city): url = 'http://api.openweathermap.org/data/2.5/weather' params = { 'q': city, 'appid': '11c0d3dc6093f7442898ee49d2430d20', 'units': 'metric' } res = requests.get(url, params=params) data = res.json() print(f"Current weather in {city}:") print(f"Temperature: {data['main']['temp']} C") print(f"Humidity: {data['main']['humidity']}%") print(f"Pressure: {data['main']['pressure']} hPa") print(f"Wind speed: {data['wind']['speed']} m/s") if __name__ == "__main__": get_current_weather('Baku')