weboob.capabilities.weather

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

Bases: weboob.capabilities.weather.BaseWeather

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.weather.BaseWeather

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]
class weboob.capabilities.weather.BaseWeather(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

Variables:
  • precipitation – (str) Precipitation type
  • precipitation_probability – (float) Probability of precipitation (ratio)
  • wind_direction – (str) Wind direction
  • wind_speed – (float) Wind speed (in km/h)
  • humidity – (float) Relative humidity (ratio)
  • pressure – (float) Atmospheric pressure (in hPa)
  • visibility – (float) Horizontal visibility distance (in km)
  • cloud – (int, long) Cloud coverage (in okta (0-8))
class weboob.capabilities.weather.Direction

Bases: weboob.capabilities.base.Enum

E = 'East'
ENE = 'East-Northeast'
ESE = 'East-Southeast'
N = 'North'
NE = 'Northeast'
NNE = 'North-Northeast'
NNW = 'North-Northwest'
NW = 'Northwest'
S = 'South'
SE = 'Southeast'
SSE = 'South-Southeast'
SSW = 'South-Southwest'
SW = 'Southwest'
W = 'West'
WNW = 'West-Northwest'
WSW = 'West-Southwest'
class weboob.capabilities.weather.Precipitation

Bases: weboob.capabilities.base.Enum

DZ = 'Drizzle'
GR = 'Hail'
GS = 'Small hail'
IC = 'Ice cristals'
PL = 'Ice pellets'
RA = 'Rain'
SG = 'Small grains'
SN = 'Snow'
UP = 'Unknown precipiation'