.oO SearXNG Developer Documentation Oo.
|
Classes | |
class | Compass |
class | DateTime |
class | GeoLocation |
class | Pressure |
class | RelativeHumidity |
class | Temperature |
class | WindSpeed |
Functions | |
get_WEATHER_DATA_CACHE () | |
str | _get_sxng_locale_tag () |
str|None | symbol_url (WeatherConditionType condition) |
Variables | |
list | __all__ |
ExpireCache | WEATHER_DATA_CACHE = None |
str | YR_WEATHER_SYMBOL_URL = "https://raw.githubusercontent.com/nrkno/yr-weather-symbols/refs/heads/master/symbols/outline" |
DateTimeFormats = typing.Literal["full", "long", "medium", "short"] | |
WeatherConditionType | |
dict | YR_WEATHER_SYMBOL_MAP |
condition | |
_cache = get_WEATHER_DATA_CACHE() | |
str | title = "cached weather condition symbols" |
Implementations used for weather conditions and forecast.
|
protected |
Definition at line 57 of file weather.py.
Referenced by searx.weather.Compass.l10n(), searx.weather.DateTime.l10n(), searx.weather.Pressure.l10n(), searx.weather.RelativeHumidity.l10n(), searx.weather.Temperature.l10n(), searx.weather.WindSpeed.l10n(), and searx.weather.GeoLocation.locale().
searx.weather.get_WEATHER_DATA_CACHE | ( | ) |
Definition at line 42 of file weather.py.
Referenced by searx.weather.GeoLocation.by_query(), and symbol_url().
str | None searx.weather.symbol_url | ( | WeatherConditionType | condition | ) |
Returns ``data:`` URL for the weather condition symbol or ``None`` if the condition is not of type :py:obj:`WeatherConditionType`. If symbol (SVG) is not already in the :py:obj:`WEATHER_DATA_CACHE` its fetched from https://github.com/nrkno/yr-weather-symbols
Definition at line 92 of file weather.py.
References get_WEATHER_DATA_CACHE().
|
private |
Definition at line 6 of file weather.py.
|
protected |
Definition at line 596 of file weather.py.
searx.weather.condition |
Definition at line 594 of file weather.py.
searx.weather.DateTimeFormats = typing.Literal["full", "long", "medium", "short"] |
Definition at line 195 of file weather.py.
str searx.weather.title = "cached weather condition symbols" |
Definition at line 597 of file weather.py.
ExpireCache searx.weather.WEATHER_DATA_CACHE = None |
Definition at line 36 of file weather.py.
searx.weather.WeatherConditionType |
Definition at line 481 of file weather.py.
dict searx.weather.YR_WEATHER_SYMBOL_MAP |
Definition at line 536 of file weather.py.
str searx.weather.YR_WEATHER_SYMBOL_URL = "https://raw.githubusercontent.com/nrkno/yr-weather-symbols/refs/heads/master/symbols/outline" |
Definition at line 39 of file weather.py.