searxng/docs
Markus Heiser 2039060b64 [mod] revision of the settings_loader
The intention of this PR is to modernize the settings_loader implementations.
The concept is old (remember, this is partly from 2014), back then we only had
one config file, meanwhile we have had a folder with config files for a very
long time.  Callers can now load a YAML configuration from this folder as
follows ::

    settings_loader.get_yaml_cfg('my-config.yml')

- BTW this is a fix of #3557.

- Further the `existing_filename_or_none` construct dates back to times when
  there was not yet a `pathlib.Path` in all Python versions we supported in the
  past.

- Typehints have been added wherever appropriate

At the same time, this patch should also be downward compatible and not
introduce a new environment variable. The localization of the folder with the
configurations is further based on:

    SEARXNG_SETTINGS_PATH (wich defaults to /etc/searxng/settings.yml)

Which means, the default config folder is `/etc/searxng/`.

ATTENTION: intended functional changes!

 If SEARXNG_SETTINGS_PATH was set and pointed to a not existing file, the
 previous implementation silently loaded the default configuration.  This
 behavior has been changed: if the file or folder does not exist, an
 EnvironmentError exception will be thrown in future.

Closes: https://github.com/searxng/searxng/issues/3557
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-14 18:10:06 +02:00
..
_themes/searxng [dev-env] upgrade Sphinx-doc 7.2.3 and unpin at v7.1.2 on py3.8 2023-08-27 17:22:45 +02:00
admin [mod] revision of the settings_loader 2024-07-14 18:10:06 +02:00
build-templates [doc] improve documentation of make targets and ./manage script 2023-08-06 19:37:12 +02:00
dev [feat] engine: implementation of alpine linux packages 2024-07-14 17:57:58 +02:00
src [mod] revision of the settings_loader 2024-07-14 18:10:06 +02:00
user [doc] rearranges Settings & Engines docs for better readability 2023-07-01 22:45:19 +02:00
utils [fix] spelling 2023-09-18 16:20:27 +02:00
conf.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
index.rst [feat] engine: implementation of gitea 2024-05-15 07:23:57 +02:00
own-instance.rst [doc] rearranges Settings & Engines docs for better readability 2023-07-01 22:45:19 +02:00