Just starting out the requests library, anything to improve? {Code down below)

Posted by ButterscotchFirst755@reddit | Python | View on Reddit | 3 comments

import requests

# Loop
while True:
    location = input("Enter a city:")
    # Get weather data
    response = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={location}&APPID=MYKEYf&units=metric")
    decoded = response.content.decode()
    data = response.json()
    
    if response.status_code != 200:
        print("City not found!")

    place = data['name']
    country = data['sys']['country']
    weather = data['weather'][0]['description']
    wind = data['wind']['speed']
    convertwind = int(wind)
    temperature = data['main']['feels_like']
    converttemp = int(temperature)

    print(f"Location: {place}")
    print(f"The location of your city is {place}, and the country is {country}.")
    print(f"The weather of your city is {weather}.")
    print(f"Your wind in your city is {convertwind}.")
    print(f"Your temperature is {converttemp}°C.")