summaryrefslogtreecommitdiff
path: root/searx/engines/open_meteo.py
AgeCommit message (Collapse)Author
2025-10-01[fix] JSON format: serialization of the result-typesMarkus Heiser
The ``JSONEncoder`` (``format="json"``) must perform a conversion to the built-in types for the ``msgspec.Struct``:: if isinstance(o, msgspec.Struct): return msgspec.to_builtins(o) The result types are already of type ``msgspec.Struct``, so they can be converted into built-in types. The field types (in the result type) that were not yet of type ``msgspec.Struct`` have been converted to:: searx.weather.GeoLocation@dataclass -> msgspec.Struct searx.weather.DateTime -> msgspec.Struct searx.weather.Temperature -> msgspec.Struct searx.weather.PressureUnits -> msgspec.Struct searx.weather.WindSpeed -> msgspec.Struct searx.weather.RelativeHumidity -> msgspec.Struct searx.weather.Compass -> msgspec.Struct BTW: Wherever it seemed sensible, the typing was also modernized in the modified files. Closes: https://github.com/searxng/searxng/issues/5250 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-31[mod] weather results: add types, i18n/l10n, symbols & unit conversionsMarkus Heiser
The types necessary for weather information such as GeoLocation, DateTime, Temperature,Pressure, WindSpeed, RelativeHumidity, Compass (wind direction) and symbols for the weather have been implemented. There are unit conversions and translations for weather property labels. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-31[feat] open meteo: use new weather answererBnyro
2025-02-07[chore] engines: replace datetime.utcfromtimestamp with datetime.fromtimestampBnyro
2024-04-07[feat] engine: implementation of Open MeteoBnyro