This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This is WIP, it is a first attempt to implement https://github.com/searx/searx/wiki/New-architecture-proposal
. ./local/py3/bin/activate; python -m searx.web
i18n:
request
obect in the global scope, sogettext
is available usingrequest.state.gettext
(currently there is no lazy / delayed evaluation ).overlay.install_gettext_translations(get_translations(locale), newstyle=True)
)image proxy:
searx.web.middleware
should be a AWSGI middleware (currently it requires toawait pre_request(request)
)/search
: call SearchWithPlugins using a thread pool. The current implementation is really inefficient:search.search
I think
get_base_url
is not required with starlette : https://www.starlette.io/release-notes/#01211Why is this change important?
This change should NOT be merged, it is a request for comment.
How to test this PR locally?
. ./local/py3/bin/activate; python -m searx.web
with / withoutSEARX_DEBUG=1
.Author's checklist
Related issues