weboob.capabilities.weather

class weboob.capabilities.weather.Forecast(date=NotLoaded, low=None, high=None, text=None, unit=None, url=None)

Bases: weboob.capabilities.base.BaseObject

Weather forecast.
Variables:
  • date – (datetime, date, basestring) Date for the forecast
  • low – (Temperature) Low temperature
  • high – (Temperature) High temperature
  • text – (unicode) Comment on forecast
class weboob.capabilities.weather.Current(date=NotLoaded, temp=None, text=None, unit=None, url=None)

Bases: weboob.capabilities.base.BaseObject

Current weather.
Variables:
  • date – (date, datetime) Date of measure
  • text – (unicode) Comment about current weather
  • temp – (Temperature) Current temperature
class weboob.capabilities.weather.City(id='', name=None, url=None)

Bases: weboob.capabilities.base.BaseObject

City where to find weather.
Variables:name – (unicode) Name of city
exception weboob.capabilities.weather.CityNotFound

Bases: weboob.capabilities.base.UserError

Raised when a city is not found.

class weboob.capabilities.weather.Temperature(value=NotLoaded, unit=u'', url=None)

Bases: weboob.capabilities.base.BaseObject

Variables:
  • value – (float) Temperature value
  • unit – (unicode) Input unit
ascelsius()
asfahrenheit()
class weboob.capabilities.weather.CapWeather

Bases: weboob.capabilities.base.Capability

Capability for weather websites.

get_current(city_id)

Get current weather.

Parameters:city_id – ID of the city
Return type:Current

Look for a city.

Parameters:pattern (str) – pattern to search
Return type:iter[City]
iter_forecast(city_id)

Iter forecasts of a city.

Parameters:city_id – ID of the city
Return type:iter[Forecast]