mex.extractors.kvis package

Subpackages

Submodules

mex.extractors.kvis.connector module

class mex.extractors.kvis.connector.KVISConnector

Bases: BaseConnector

Connector to handle authentication and queries for KVIS SQL server.

__init__() None

Create a new connector instance.

close() None

Close the underlying connection.

parse_rows(model: type[BaseModel]) list[dict[str, Any]]

Execute whitelisted queries and zip results to column name.

mex.extractors.kvis.extract module

mex.extractors.kvis.extract.extract_sql_table(model: type[ModelT]) list[ModelT]

Extract sql tables and parse each row into pydantic models.

Returns:

list of parsed pydantic ModelT

mex.extractors.kvis.main module

mex.extractors.kvis.settings module

class mex.extractors.kvis.settings.KVISSettings(*, mapping_path: AssetsPath = AssetsPath('mappings/kvis'), mssql_connection_dsn: str = 'DRIVER={ODBC Driver 18 for SQL Server};SERVER=domain.tld;DATABASE=database')

Bases: BaseModel

Settings definition for the infection protection act data.

mapping_path: AssetsPath
model_config = {'extra': 'ignore', 'populate_by_name': True, 'str_max_length': 100000, 'str_min_length': 1, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

mssql_connection_dsn: str

Module contents