API Requests in Python
-
Hello
I'm looking for a piece of code, an example of code to retrieve weather data (temperature, pressure ...) with a windy API in Python.
I find examples with open weather map but never for windy.
Can you help me?
Thank you
-
@drakiro Hello, all the information can be found in our API documentation.
-
data = {"lat": -39.809, "lon": -16.787, "model": "gfs", "parameters": ["wind"], "key": "abcd1234" } header = {"Content-Type" :"application/json"} s= requests.post("https://api.windy.com/api/point-forecast/v2", json = data, headers = header) print(s.text)
-
The point-weather API documentation does not make any reference to include application/json content-type header. Please update the so people don't have stumble around trying to find out why their posts are returning 400.
-
2 years later and this simple addition is still not in the docs. I have wasted 30 minutes of my life trying to figure this out.
Pity, I was going to integrate Windy API into our new application, but considering the lack of interest in just simply making the first step of the docs complete I lack the confidence to continue further with Windy.
Windy seems to be a shiny on the outside but a bit rotten on the inside.