.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 = "Q44395" |
Units = typing.Literal["Pa", "hPa", "cm Hg", "bar"] | |
units = list(typing.get_args(Units)) | |
Class for converting pressure units and for string representation of measured values.
Definition at line 291 of file weather.py.
searx.weather.Pressure.__init__ | ( | self, | |
float | value, | ||
Units | unit ) |
Definition at line 302 of file weather.py.
References units, and searx.weather.Temperature.units.
searx.weather.Pressure.__str__ | ( | self | ) |
Definition at line 308 of file weather.py.
References searx.weather.DateTime.l10n(), l10n(), and searx.weather.Temperature.l10n().
str searx.weather.Pressure.l10n | ( | self, | |
Units | None | unit = None, | ||
babel.Locale | GeoLocation | None | locale = None, | ||
str | template = "{value} {unit}", | ||
str | num_pattern = "#,##0" ) |
Definition at line 314 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, value(), and searx.weather.Temperature.value().
Referenced by searx.weather.Compass.__str__(), __str__(), searx.weather.RelativeHumidity.__str__(), and searx.weather.WindSpeed.__str__().
float searx.weather.Pressure.value | ( | self, | |
Units | unit ) |
Definition at line 311 of file weather.py.
References si, searx.weather.Temperature.si, si_name, and searx.weather.Temperature.si_name.
Referenced by searx.weather.Compass.l10n(), l10n(), searx.weather.RelativeHumidity.l10n(), and searx.weather.WindSpeed.l10n().
Definition at line 306 of file weather.py.
Referenced by value(), and searx.weather.WindSpeed.value().
|
static |
Definition at line 295 of file weather.py.
Referenced by value(), and searx.weather.WindSpeed.value().
|
static |
Definition at line 297 of file weather.py.
|
static |
Definition at line 300 of file weather.py.
Referenced by __init__(), and searx.weather.WindSpeed.__init__().