def get_weather_info(lat,lon): response=requests.get(f'https://api.openweathermap.org/data/2.5/weather?lat= {lat}&lon={lon}&limit=1&appid={API_KEY}&lang=PL&units=metric') #print(response.status_code) #pprint(response.json()) response_json = response.json() weather = response_json['weather'][0]['description'] temperature = response_json['main']['temp'] pressure = response_json['main']['pressure'] humidity = response_json['main']['humidity'] return weather, temperature, pressure, humidity