summaryrefslogtreecommitdiff
path: root/searx/__init__.py
AgeCommit message (Collapse)Author
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: environment variablesAlexandre Flament
2021-09-11[mod] production mode: make sure to set the log level to WARNINGAlexandre Flament
set: * the root logger level to WARNING * the werkzeug logger level to WARNING (useful when there is no uwsgi)
2021-09-10[mod] debug mode: use coloredlogs packageAlexandre Flament
in debug mode, add some padding to make the output more readable in procution mode, add the timestamp
2021-09-07[pylint] searx: drop no longer needed 'missing-function-docstring'Markus Heiser
Suggested-by: @dalf https://github.com/searxng/searxng/issues/102#issuecomment-914168470 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-07-21[mod] drop obsolete searx.brand namespaceMarkus Heiser
The usages of the searx.brand namespace has been removed, the searx.brand namespace is now longer needed. The searx.brand namespace was an interim solution which has been added in commit 9e53470b4, see commit message there ... This patch is a first 'proof of concept'. Later we can decide to remove the brand namespace entirely or not. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-07-21[mod] drop unused setting option brand:twitter_urlMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-07-18[mod] drop usage of the searx.brand namespace (python procs)Markus Heiser
Added function searx.get_setting(name, default=_unset): Returns the value to which ``name`` point. If there is no such name in the settings and the ``default`` is unset, a KeyError exception is raised. In all the python processes .. - make docs - make buildenv - make install (setup.py) the usage of the 'brand.*' name space is replaced by 'searx.get_setting' function. - brand.SEARX_URL --> get_setting('server.base_url') - brand.GIT_URL --> get_setting('brand.git_url') - brand.GIT_BRANCH' --> get_setting('server.base_url') - brand.ISSUE_URL --> get_setting('brand.issue_url') - brand.DOCS_URL --> get_setting('brand.docs_url') - brand.PUBLIC_INSTANCES --> get_setting('brand.public_instances') - brand.CONTACT_URL --> get_setting('general.contact_url', '') - brand.WIKI_URL --> get_setting('brand.wiki_url') - brand.TWITTER_URL --> get_setting('brand.twitter_url', '') Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-06-08[mod] move hook to set Unix thread name into searx.unixthreadnameAlexandre Flament
requires setproctitle (but optional)
2021-06-01[pylint] searx/__init__.py & searx/settings_defaults.pyMarkus Heiser
BTW: normalize some indentations in searx/settings_defaults.py Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-06-01[mod] move all default settings into searx.settings_defaultsAlexandre Flament
2021-04-27[mod] searx.metrics.error_recorder: store relative file name instead of the ↵Alexandre Flament
full absolute file name.
2021-04-25[mod] /stats : detail per engineAlexandre Flament
allow to submit a github issue including the technical details (exceptions, errors, warning, checker result)
2021-01-11[mod] settings.yml: move brand settings to a dedicated sectionAlexandre Flament
2021-01-11[mod] get rid of searx/brand.pyMarkus Heiser
Removes module searx/brand.py and creates a namespace at searx.brand. This patch is a first 'proof of concept'. Later we can decide to remove the brand namespace entirely or not. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-27[mod] check secret_key when searx.webapp is importedAlexandre Flament
Without this commit the module searx checks the secret_key value. With this commit, make docs, utils/standalone_searx.py, utils/fetch_firefox_version.py works without SEARX_DEBUG=1 For reference see https://github.com/searx/searx/pull/2386
2020-11-27[enh] settings.yml: add use_default_settings option (2nd version)Alexandre Flament
2020-11-26[enh] settings.yml: add use_default_settings optionAlexandre Flament
This change is backward compatible with the existing configurations. If a settings.yml loaded from an user defined location (SEARX_SETTINGS_PATH or /etc/searx/settings.yml), then this settings can relied on the default settings.yml with this option: user_default_settings:True
2020-10-09Force admins to set secret_key if debug mode is disabledNoémi Ványi
This commit also enables debug mode for unit tests.
2020-09-26[mod] upgrade requests to version 2.24.0. use ssl instead of pyopenssl.Alexandre Flament
requests 2.24.0 uses the ssl module except if it doesn't support SNI, in this case searx fallbacks to pyopenssl. searx logs a critical message and exit if the ssl modules doesn't support SNI and pyOpenSSL is not installed. searx logs a critical message and exit if the ssl version is older than 1.0.2. in requirements.txt, pyopenssl is still required to install searx as a fallback.
2020-09-10Drop Python 2 (1/n): remove unicode string and url_utilsDalf
2020-07-28[fix] resolve minor review issuesAdam Tauber
2020-07-28[enh] add external plugin supportAdam Tauber
2020-02-08[enh] introduce private enginesNoémi Ványi
This PR adds a new setting to engines named `tokens`. It expects a list of tokens which lets searx validate if the request should be accepted or not.
2019-06-17Add addr setup via SEARX_BIND_ADDRESSNicolas Gelot
2019-02-23update pyyamlNoémi Ványi
2018-01-16[fix] read utf-8 files (settings, languages, currency) with python3.5Marc Abonce Seguin
Related to discussion in #1124 The io.open import is necessary for python2
2018-01-12Merge pull request #1124 from JosephKiranBabu/python3-unicode-supportAdam Tauber
Make Python 3 able to read settings files with Unicode characters
2017-12-29[enh] overwrite secret_key from env with the SEARX_SECRET env var if exists ↵Adam Tauber
- closes #845
2017-12-21Make Python 3 able to read settings files with Unicode charactersJoseph Nuthalapati
SearX currently doesn't start up when run with Python 3 as it tries to parse the settings.yml file with ASCII codecs. There are similar problems with engines_languages.json and currencies.json Python 3 requires that files with Unicode characters be read with a 'b' flag. This also works with Python 2 and hence can be integrated into the main source code. Tested with the latest Python 3.6.4rc1 on Debian unstable. Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2017-05-15[mod] settings.yml can be /etc/searx/settings.ymlAlexandre Flament
The exact order is * first from SEARX_SETTINGS_PATH, * if not found then from searx code base, * if not found then from /etc/searx/settings.yml * if not found an exception stops searx loading
2016-10-22[mod] the environment variable SEARX_DEBUG can override the general.debug ↵dalf
value in settings.yml
2016-01-06[fix]#485 AttributeError: 'module' object has no attribute 'old_where'misnyo
2015-12-29[fix] #471 #463 fix old openssl(<1.0.2) requests verify errormisnyo
2015-08-24[fix] show debug output when enabledThomas Pointhuber
2015-04-13[mod] https rewrite pluginificationAdam Tauber
2015-01-09[enh] logging addedAdam Tauber
2014-10-19[fix] pep8 part II.Adam Tauber
2014-10-19Merge pull request #97 from pointhi/httpsAdam Tauber
Implementing https rewrite support
2014-10-15improve https rewritingThomas Pointhuber
2014-10-15Implementing https rewrite support #71Thomas Pointhuber
* parsing XML-Files which contain target, exclusions and rules * convert regex if required (is a little hack, probably does not work for all rules) * check if target rule apply for http url, and use the rules to rewrite it * add pice of code, to check if domain name has not changed during rewrite (should be rewritten, using publicsuffix instead of little hack)
2014-09-13add comments to __init__.pyThomas Pointhuber
* add comments * add licence-header
2014-01-20fix: robot fw, entry points, some flake8, package searx eggMatej Cotman
2014-01-19[enh] settings unification - new dependency: pyyamlasciimoo
2013-10-15[enh] engine typesasciimoo
2013-10-15[fix] result template tag fixasciimoo
2013-10-14[enh] result template addedasciimoo
2013-10-14[enh] initial commitasciimoo