Enums

Details

class GWeather.ConditionPhenomenon(value)

Bases: GObject.GEnum

The current or forecasted significant phenomenon.

INVALID = -1

value not available

NONE = 0

no significant phenomenon

DRIZZLE = 1
MIST = 10
FOG = 11
SMOKE = 12
VOLCANIC_ASH = 13
SAND = 14
HAZE = 15
SPRAY = 16
DUST = 17
SQUALL = 18
SANDSTORM = 19
RAIN = 2
DUSTSTORM = 20
FUNNEL_CLOUD = 21
TORNADO = 22
DUST_WHIRLS = 23
LAST = 24
SNOW = 3
SNOW_GRAINS = 4
ICE_CRYSTALS = 5
ICE_PELLETS = 6
HAIL = 7
SMALL_HAIL = 8
UNKNOWN_PRECIPITATION = 9
class GWeather.ConditionQualifier(value)

Bases: GObject.GEnum

An additional modifier applied to a GWeather.ConditionPhenomenon to describe the current or forecasted weather conditions. The exact meaning of each qualifier is described at http://www.weather.com/glossary/ and http://www.crh.noaa.gov/arx/wx.tbl.php

INVALID = -1

value not available

NONE = 0

no qualifier for the phenomenon

VICINITY = 1

phenomenon happening in the proximity of the location, not in the actual location

SHOWERS = 10

phenomenon is heavy and involves showers

DRIFTING = 11

phenomenon is moving across (valid with GWeather.ConditionPhenomenon.SAND and GWeather.ConditionPhenomenon.DUST)

FREEZING = 12

phenomenon is freezing and involves ice

LAST = 13

maximum value of the enumeration.

LIGHT = 2

phenomenon is light or predicted to be light

MODERATE = 3

phenomenon is moderate or predicted to be moderate

HEAVY = 4

phenomenon is heavy or predicted to be heavy

SHALLOW = 5

shallow fog (only valid with GWeather.ConditionPhenomenon.FOG)

PATCHES = 6

patches of fog (only valid with GWeather.ConditionPhenomenon.FOG)

PARTIAL = 7

partial fog (only valid with GWeather.ConditionPhenomenon.FOG)

THUNDERSTORM = 8

phenomenon will be a thunderstorm and/or will include lightning

BLOWING = 9

phenomenon is blowing (valid with GWeather.ConditionPhenomenon.SNOW, GWeather.ConditionPhenomenon.SAND, GWeather.ConditionPhenomenon.SPRAY, GWeather.ConditionPhenomenon.DUST)

class GWeather.DistanceUnit(value)

Bases: GObject.GEnum

The measure unit to use for sky visibility values, when retrieved by GWeather.Info.get_value_visibility().

INVALID = 0

invalid unit

DEFAULT = 1

the user preferred distance unit

METERS = 2

meters

KM = 3

kilometers (= 1000 meters)

MILES = 4

miles

class GWeather.LocationLevel(value)

Bases: GObject.GEnum

The size/scope of a particular GWeather.Location.

Locations form a hierarchy, with a GWeather.LocationLevel.WORLD location at the top, divided into regions or countries, and so on. Countries may or may not be divided into “adm1”s, and “adm1”s may or may not be divided into “adm2”s. A city will have at least one, and possibly several, weather stations inside it. Weather stations will never appear outside of cities.

Building a database with GWeather.Location.get_world() will never create detached instances, but deserializing might.

classmethod to_string(level)
Parameters:level (GWeather.LocationLevel) – a GWeather.LocationLevel
Returns:a string
Return type:str

Returns the location level as a string, useful for debugging purposes.

WORLD = 0

A location representing the entire world.

REGION = 1

A location representing a continent or other top-level region.

COUNTRY = 2

A location representing a “country” (or other geographic unit that has an ISO-3166 country code)

ADM1 = 3

A location representing a “first-level administrative division”; ie, a state, province, or similar division.

CITY = 4

A location representing a city

WEATHER_STATION = 5

A location representing a weather station.

DETACHED = 6

A location that is detached from the database, for example because it was loaded from external storage and could not be fully recovered. The parent of this location is the nearest weather station.

NAMED_TIMEZONE = 7

A location representing a named or special timezone in the world, such as UTC

class GWeather.PressureUnit(value)

Bases: GObject.GEnum

The measure unit to use for atmospheric pressure values, when retrieved by GWeather.Info.get_value_pressure().

INVALID = 0

invalid unit

DEFAULT = 1

the user preferred pressure unit

KPA = 2

kiloPascal (* 10^3 Pa)

HPA = 3

hectoPascal (* 10^2 Pa); also known as millibars, but formatted differently

MB = 4

millibars; same as GWeather.PressureUnit.HPA

MM_HG = 5

millimeters of mercury

INCH_HG = 6

inches of mercury

ATM = 7

atmospheres

class GWeather.Sky(value)

Bases: GObject.GEnum

The sky and cloud visibility. In general it is discouraged to use this value directly to compute the forecast icon: applications should instead use GWeather.Info.get_icon_name() or GWeather.Info.get_symbolic_icon_name().

classmethod to_string(sky)
Parameters:sky (GWeather.Sky) –
Return type:str
classmethod to_string_full(sky, options)
Parameters:
Return type:

str

INVALID = -1

value not available

CLEAR = 0

sky completely clear, no clouds visible

BROKEN = 1

sky mostly clear, few clouds

SCATTERED = 2

sky mostly clear, patches of clouds

FEW = 3

few clouds, sky cloudy but patches of sky visible

OVERCAST = 4

sky completely clouded, sun not visible

LAST = 5

the maximum value for the enumeration

class GWeather.SpeedUnit(value)

Bases: GObject.GEnum

The measure unit to use for wind speed values, when retrieved by GWeather.Info.get_value_wind().

INVALID = 0

invalid unit

DEFAULT = 1

the user preferred speed unit

MS = 2

meters per second

KPH = 3

kilometers per hour

MPH = 4

miles per hour

KNOTS = 5

knots

BFT = 6

Beaufort scale

class GWeather.TemperatureUnit(value)

Bases: GObject.GEnum

The measure unit to use for temperature values, when retrieved by the GWeather.Info.get_value_temp() family of functions.

classmethod to_real(unit)
Parameters:unit (GWeather.TemperatureUnit) – a tempeature unit, or GWeather.TemperatureUnit.DEFAULT
Return type:GWeather.TemperatureUnit

Resolve unit into a real temperature unit, potentially considering locale defaults.

INVALID = 0

invalid unit

DEFAULT = 1

the user preferred temperature unit

KELVIN = 2

Kelvin (absolute) temperature scale

CENTIGRADE = 3

Celsius temperature scale

FAHRENHEIT = 4

Fahrenheit temperature scale

class GWeather.WindDirection(value)

Bases: GObject.GEnum

The direction of the prevailing wind. Composite values such as north-north-east indicate a direction between the two component value (north and north-east).

classmethod to_string(wind)
Parameters:wind (GWeather.WindDirection) –
Return type:str
classmethod to_string_full(wind, options)
Parameters:
Return type:

str

INVALID = -1

value not available

VARIABLE = 0

variable throughout the day

N = 1

north

SSW = 10

south-south-west

SW = 11

south-west

WSW = 12

west-south-west

W = 13

west

WNW = 14

west-north-west

NW = 15

north-west

NNW = 16

north-north-west

LAST = 17

maximum value for the enumeration

NNE = 2

north-north-east

NE = 3

north-east

ENE = 4

east-north-east

E = 5

east

ESE = 6

east-south-east

SE = 7

south-east

SSE = 8

south-south-east

S = 9

south