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.
Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
NodeBB & contributors, OSM & contributors, HERE maps