summaryrefslogtreecommitdiff
path: root/searx/data/__init__.py
AgeCommit message (Collapse)Author
2024-03-11[mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTIONMarkus Heiser
In the past, some files were tested with the standard profile, others with a profile in which most of the messages were switched off ... some files were not checked at all. - ``PYLINT_SEARXNG_DISABLE_OPTION`` has been abolished - the distinction ``# lint: pylint`` is no longer necessary - the pylint tasks have been reduced from three to two 1. ./searx/engines -> lint engines with additional builtins 2. ./searx ./searxng_extra ./tests -> lint all other python files Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-20[mod] reduce memory footprint by not calling babel.Locale.parse at runtimeAlexandre Flament
babel.Locale.parse loads more than 60MB in RAM. The only purpose is to get: LOCALE_NAMES - searx.data.LOCALES["LOCALE_NAMES"] RTL_LOCALES - searx.data.LOCALES["RTL_LOCALES"] This commit calls babel.Locale.parse when the translations are update from weblate and stored in:: searx/data/locales.json This file can be build by:: ./manage data.locales By store these variables in searx.data when the translations are updated we save round about 65MB (usually 4 worker = 260MB of RAM saved. Suggested-by: https://github.com/searxng/searxng/discussions/2633#discussioncomment-8490494 Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2023-03-24[mod] replace engines_languages.json by engines_traits.jsonMarkus Heiser
Implementations of the *traits* of the engines. Engine's traits are fetched from the origin engine and stored in a JSON file in the *data folder*. Most often traits are languages and region codes and their mapping from SearXNG's representation to the representation in the origin search engine. To load traits from the persistence:: searx.enginelib.traits.EngineTraitsMap.from_data() For new traits new properties can be added to the class:: searx.enginelib.traits.EngineTraits .. hint:: Implementation is downward compatible to the deprecated *supported_languages method* from the vintage implementation. The vintage code is tagged as *deprecated* an can be removed when all engines has been ported to the *traits method*. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-29[mod] remove deprecate codeAlexandre Flament
remove code to support Python 3.5 and Python 3.6
2021-12-27[format.python] initial formatting of the python codeMarkus Heiser
This patch was generated by black [1]:: make format.python [1] https://github.com/psf/black Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-02SearXNG: searxng_extraAlexandre Flament
2021-09-24[mod] add /engine_descriptions.json endpointAlexandre Flament
returns engine descriptions (JSON): * key: engine name * value: description in the user locale, use English description as a fallback
2021-06-09[pylint] searx/data/__init__.pyMarkus Heiser
BTW: add doc strings and moved __all__ to the top [1] [1] https://www.python.org/dev/peps/pep-0008/#module-level-dunder-names Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-06-09[fix] searx/data/__init__.py: rename __init__ as __all__Alexandre Flament
2021-06-09[enh] openstreetmap / map template: improve resultsAlexandre Flament
implements ideas described in #69 * update the engine * use wikidata * update map.html template
2021-02-24[mod] add utils/fetch_external_bangs.pyAlexandre Flament
Based on duckduckgo bangs Store bangs on a trie to allow autocomplete (not in this commit)
2021-01-12[mod] drop Python 3.5 supportAlexandre Flament
2020-10-28[mod] add external_urls.json and wikidata_units.jsonAlexandre Flament
2020-10-27[mod] ahmia_filter.py: minor changesAlexandre Flament
- use result['parsed_url'] - load ahmia_blacklist.txt in searx.datae
2020-10-07[mod] Add searx.data moduleAlexandre Flament
Instead of loading the data/*.json in different location, load these files in the new searx.data module.