Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    API Requests in Python

    Windy API v4
    6
    5
    6.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Drakiro
      last edited by

      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

      KorinaK 1 Reply Last reply Reply Quote 1
      • KorinaK
        Korina @Drakiro
        last edited by

        @drakiro Hello, all the information can be found in our API documentation.

        Korina

        N 1 Reply Last reply Reply Quote 1
        • G
          g.martins
          last edited by

          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)
          
          L 1 Reply Last reply Reply Quote 9
          • L
            llandudnocam @g.martins
            last edited by

            @Korina

            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.

            https://api.windy.com/point-forecast/docs

            1 Reply Last reply Reply Quote 5
            • N
              newtonenergy @Korina
              last edited by

              @Korina

              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.

              1 Reply Last reply Reply Quote 4
              • First post
                Last post
              Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
              NodeBB & contributors, OSM & contributors, HERE maps
              Terms of Use     Privacy Policy