.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self, float value, Units unit) | |
__str__ (self) | |
float | value (self, Units unit) |
str | l10n (self, Units|None unit=None, babel.Locale|GeoLocation|None locale=None, str template="{value} {unit}", str num_pattern="#,##0") |
Public Attributes | |
float | si = convert_to_si(si_name=self.si_name, symbol=unit, value=value) |
Static Public Attributes | |
str | si_name = "Q182429" |
Units = typing.Literal["m/s", "km/h", "kn", "mph", "mi/h", "Bft"] | |
units = list(typing.get_args(Units)) | |
Class for converting speed or velocity units and for string representation of measured values. .. hint:: Working with unit ``Bft`` (:py:obj:`searx.wikidata_units.Beaufort`) will throw a :py:obj:`ValueError` for egative values or values greater 16 Bft (55.6 m/s)
Definition at line 333 of file weather.py.
searx.weather.WindSpeed.__init__ | ( | self, | |
float | value, | ||
Units | unit ) |
Definition at line 351 of file weather.py.
References searx.weather.Pressure.units, searx.weather.Temperature.units, and units.
searx.weather.WindSpeed.__str__ | ( | self | ) |
Definition at line 357 of file weather.py.
References searx.weather.DateTime.l10n(), searx.weather.Pressure.l10n(), searx.weather.Temperature.l10n(), and l10n().
str searx.weather.WindSpeed.l10n | ( | self, | |
Units | None | unit = None, | ||
babel.Locale | GeoLocation | None | locale = None, | ||
str | template = "{value} {unit}", | ||
str | num_pattern = "#,##0" ) |
Definition at line 363 of file weather.py.
References searx.weather._get_sxng_locale_tag(), searx.preferences.BooleanSetting.value, searx.preferences.EnumStringSetting.value, searx.preferences.MapSetting.value, searx.preferences.MultipleChoiceSetting.value, searx.preferences.SearchLanguageSetting.value, searx.preferences.Setting.value, searx.weather.Pressure.value(), searx.weather.Temperature.value(), and value().
Referenced by searx.weather.Compass.__str__(), searx.weather.RelativeHumidity.__str__(), and __str__().
float searx.weather.WindSpeed.value | ( | self, | |
Units | unit ) |
Definition at line 360 of file weather.py.
References searx.weather.Pressure.si, searx.weather.Temperature.si, si, searx.weather.Pressure.si_name, searx.weather.Temperature.si_name, and si_name.
Referenced by searx.weather.Compass.l10n(), searx.weather.RelativeHumidity.l10n(), and l10n().
Definition at line 355 of file weather.py.
Referenced by value().
|
static |
Definition at line 344 of file weather.py.
Referenced by value().
|
static |
Definition at line 346 of file weather.py.
|
static |
Definition at line 349 of file weather.py.
Referenced by __init__().