ZeevG / python-forecast.io

A thin Python Wrapper for the Dark Sky (formerly forecast.io) weather API
http://zeevgilovitz.com/python-forecast.io/
Other
424 stars 88 forks source link

minutely() #34

Closed fabaff closed 9 years ago

fabaff commented 9 years ago

While playing around with python-forecast.io. I have trouble to get the minutely data. With hourly() it works like a charm

>>> import forecastio
>>> forecast = forecastio.load_forecast('3xxxx', 46.9167, 7.4667)
>>> hour = forecast.hourly()
>>> print(hour.summary)
Light rain starting tomorrow afternoon.

but minutely() seems to get no data.

>>> minute = forecast.minutely()
>>> print(minute.summary)
None
>>> print(minute.icon)
None
ZeevG commented 9 years ago

Actually this is just how the Forecast.io http API works! If you have a look at their docs (https://developer.forecast.io/docs/v2#data-blocks), they mention that if there is no data for a particular time period/Data Block then that time period will be omitted. You can check this out yourself by loading the corresponding URL in your browser https://api.forecast.io/forecast/3xxxx/46.9167,7.4667

I have found minutely is often missing, especially if you do a more complicated query. Hourly and Daily nearly always seem to be available.

By the way, mqtt-panel is very cool. I've been doing some mqtt stuff myself lately.