Skip to content

Make analyzer REST languages configurable with SUPPORTED_LANGUAGES#2171

Open
rodboev wants to merge 1 commit into
data-privacy-stack:mainfrom
rodboev:pr/supportedentities-language-config
Open

Make analyzer REST languages configurable with SUPPORTED_LANGUAGES#2171
rodboev wants to merge 1 commit into
data-privacy-stack:mainfrom
rodboev:pr/supportedentities-language-config

Conversation

@rodboev

@rodboev rodboev commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Change Description

Add a runtime supported-languages override for the analyzer REST service so /supportedentities and /recognizers can expose non-English recognizers without requiring a custom analyzer YAML mount.

Issue reference

Fixes #1058

Verification

  • cd presidio-analyzer && poetry run pytest tests/test_analyzer_engine_provider.py tests/test_app.py46 passed, 3 skipped, 21 warnings in 38.67s
  • cd presidio-analyzer && poetry run ruff check app.py presidio_analyzer/analyzer_engine_provider.py tests/test_analyzer_engine_provider.py tests/test_app.pyAll checks passed!

The Poetry environment initially lacked the analyzer test dependencies, and poetry install --no-interaction --no-root timed out after 120 seconds. The checks passed after installing the required runtime and test dependencies into the package Poetry environment. The three skipped tests are the existing optional engine cases.

Note on CHANGELOG

This change adds a user-visible server configuration input, so CHANGELOG.md under Unreleased should be updated.

Checklist

  • Tests added and passing
  • Lint checks passing
  • Documentation updated if needed
  • Changelog updated
  • I have read the contribution guidelines

Signed-off-by: Rod Boev <rod.boev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

REST endpoint /supportedentities only supports english

1 participant