forked from jcconnell/python-magicseaweed
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
23 lines (18 loc) · 611 Bytes
/
run.py
File metadata and controls
23 lines (18 loc) · 611 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from magicseaweed import MSW_Forecast
import os
import pprint
api_key = os.environ.get('MSW_API_KEY')
ponce_id = 348
bethune_id= 3771
pp = pprint.PrettyPrinter(indent=4)
ponce_forecast = MSW_Forecast(api_key, ponce_id)
ponce_now = ponce_forecast.get_current()
print(ponce_now.attrs)
bethune_forecast = MSW_Forecast(api_key, bethune_id)
bethune_future = bethune_forecast.get_future()
print(bethune_future.summary)
for forecast in bethune_future.data:
pp.pprint(forecast.attrs)
pp.pprint(forecast.charts_swell)
pp.pprint(forecast.get_swell_url('combined'))
pp.pprint(forecast.get_wind_url())