Last active
March 15, 2020 19:53
-
-
Save caalle/6b1103a0c246ad7fc4fa41b8ffe58abd to your computer and use it in GitHub Desktop.
Fetch forecast for coordinate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| response = requests.get( | |
| 'https://api.stormglass.io/v2/weather/point', | |
| params={ | |
| 'lat': 58.5, | |
| 'lng': 17.8, | |
| 'params': 'waveHeight,wavePeriod,swellHeight,swellDirection,windSpeed' | |
| }, | |
| headers={ | |
| 'Authorization': 'YOUR API KEY' # Get your at https://stormglass.io | |
| } | |
| ) | |
| # Do something with response data. | |
| json_data = response.json() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment