.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
zoneinfo.ZoneInfo | zoneinfo (self) |
__str__ (self) | |
babel.Locale | locale (self) |
"GeoLocation" | by_query (cls, str search_term) |
Public Attributes | |
timezone | |
country_code |
Protected Member Functions | |
dict[str, str] | _query_open_meteo (cls, str search_term) |
Minimal implementation of Geocoding.
Definition at line 123 of file weather.py.
searx.weather.GeoLocation.__str__ | ( | self | ) |
Definition at line 144 of file weather.py.
References searx.engines.wikidata.WDAmountAttribute.name, searx.engines.wikidata.WDAttribute.name, searx.engines.wikidata.WDDateAttribute.name, searx.engines.wikidata.WDGeoAttribute.name, searx.engines.wikidata.WDLabelAttribute.name, searx.preferences.BooleanChoices.name, and searx.search.models.EngineRef.name.
|
protected |
Definition at line 187 of file weather.py.
Referenced by by_query().
"GeoLocation" searx.weather.GeoLocation.by_query | ( | cls, | |
str | search_term ) |
Factory method to get a GeoLocation object by a search term. If no location can be determined for the search term, a :py:obj:`ValueError` is thrown.
Definition at line 170 of file weather.py.
References _query_open_meteo(), and searx.weather.get_WEATHER_DATA_CACHE().
babel.Locale searx.weather.GeoLocation.locale | ( | self | ) |
Definition at line 147 of file weather.py.
References searx.weather._get_sxng_locale_tag().
zoneinfo.ZoneInfo searx.weather.GeoLocation.zoneinfo | ( | self | ) |
Definition at line 141 of file weather.py.
searx.weather.GeoLocation.country_code |
Definition at line 156 of file weather.py.
searx.weather.GeoLocation.timezone |
Definition at line 142 of file weather.py.