mex.backend.http_test_server package¶
Submodules¶
mex.backend.http_test_server.main module¶
- mex.backend.http_test_server.main.head_http_test_server(_: str) Response¶
HEAD endpoint for checking availibility.
- mex.backend.http_test_server.main.http_test_server(test_data_path: str) FileResponse¶
Return http server test data defined in mex-assets.
- mex.backend.http_test_server.main.lifespan(_: FastAPI) AsyncIterator[None]¶
Async context manager to execute startup and teardown of the FastAPI app.
- mex.backend.http_test_server.main.post_datscha_web_login() RedirectResponse¶
Login logic for datscha web.
mex.backend.http_test_server.settings module¶
- class mex.backend.http_test_server.settings.HttpTestServerSettings(_env_file: Path | str | Sequence[Path | str] | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_nested_delimiter: str | None = None, _secrets_dir: str | Path | None = None, *, MEX_DEBUG: bool = False, MEX_SINK: list[Sink] = [Sink.NDJSON], MEX_ASSETS_DIR: Path = PosixPath('/home/runner/work/mex-backend/mex-backend/assets'), MEX_OPS_DIR: Path = PosixPath('/home/runner/work/mex-backend/mex-backend/ops'), MEX_WORK_DIR: Path = PosixPath('/home/runner/work/mex-backend/mex-backend'), MEX_IDENTITY_PROVIDER: IdentityProvider = IdentityProvider.MEMORY, MEX_BACKEND_API_URL: HttpUrl = HttpUrl('http://localhost:8080/'), MEX_BACKEND_API_KEY: SecretStr = SecretStr('**********'), MEX_BACKEND_API_PARALLELIZATION: int = 1, MEX_BACKEND_API_CHUNK_SIZE: int = 25, MEX_VERIFY_SESSION: bool | OpsPath = True, MEX_ORGANIGRAM_PATH: AssetsPath = AssetsPath('raw-data/organigram/organizational_units.json'), MEX_PRIMARY_SOURCES_PATH: AssetsPath = AssetsPath('raw-data/primary-sources/primary-sources.json'), MEX_LDAP_URL: SecretStr = SecretStr('**********'), MEX_LDAP_SEARCH_BASE: str = 'dc=ldapmock,dc=local', MEX_WIKI_API_URL: HttpUrl = HttpUrl('http://wikidata/'), MEX_WEB_USER_AGENT: str = 'rki/mex', MEX_ORCID_API_URL: HttpUrl = HttpUrl('https://orcid/'), MEX_HTTP_TEST_SERVER_HOST: Annotated[str, MinLen(min_length=1), MaxLen(max_length=250)] = 'localhost', MEX_HTTP_TEST_SERVER_PORT: Annotated[int, Gt(gt=0), Lt(lt=65536)] = 8088, MEX_HTTP_TEST_SERVER_ROOT_PATH: str = '', MEX_HTTP_TEST_SERVER_TEST_DATA_DIRECTORY: AssetsPath = AssetsPath('test-data/http-test-server'))¶
Bases:
BaseSettingsSettings definition for the http_test_server.
- http_test_server_host: str¶
- http_test_server_port: int¶
- http_test_server_root_path: str¶
- http_test_server_test_data_directory: AssetsPath¶
- model_config = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'cli_avoid_json': False, 'cli_enforce_required': False, 'cli_exit_on_error': True, 'cli_flag_prefix_char': '-', 'cli_hide_none_type': False, 'cli_ignore_unknown_args': False, 'cli_implicit_flags': False, 'cli_kebab_case': False, 'cli_parse_args': None, 'cli_parse_none_str': None, 'cli_prefix': '', 'cli_prog_name': None, 'cli_shortcuts': None, 'cli_use_class_docs_for_groups': False, 'enable_decoding': True, 'env_file': '.env', 'env_file_encoding': 'utf-8', 'env_ignore_empty': False, 'env_nested_delimiter': '__', 'env_nested_max_split': None, 'env_parse_enums': None, 'env_parse_none_str': None, 'env_prefix': 'mex_', 'env_prefix_target': 'variable', 'extra': 'ignore', 'json_file': None, 'json_file_encoding': None, 'nested_model_default_partial_update': False, 'populate_by_name': True, 'protected_namespaces': ('model_validate', 'model_dump', 'settings_customise_sources'), 'secrets_dir': None, 'toml_file': None, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True, 'validate_default': True, 'yaml_config_section': None, 'yaml_file': None, 'yaml_file_encoding': None}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].