API access for python training

Those who opted for python training-How many of you are not able to access the API from the github that sir asked us to refer to for the weather project and how to solve that(https://goweather.herokuapp.com/weather/Curitiba) not working

Give me some time , i will discuss it with my team then come to you with a suitable solution.

Hi , Try with below code

import requests
import json
response = requests.get(‘https://goweather.herokuapp.com/weather/panjim’)
data = json.loads(response.text)
temperature = data.get(‘temperature’)
wind = data.get(‘wind’)
detail = data.get(‘description’)

By using this link to find the weather description, you can change the name of the city accordingly.

example1: https://goweather.herokuapp.com/weather/panjim
example2: https://goweather.herokuapp.com/weather/arizona
example3: https://goweather.herokuapp.com/weather/mysore

Do let me know if it helps you.

only some cities weather will be working with this API.