assets_guardian.core.reporting.excel.generic_parser

Functions

parse_workbook_data(workbook_data,Β ...[,Β source])

Parses an Excel sheet to instantiate domain models.

assets_guardian.core.reporting.excel.generic_parser.parse_workbook_data(workbook_data: dict[str, Any], sheet_name: str, model_class: type, rules_file_path: str | Path, source: str = 'unknown') list[Any][source]

Parses an Excel sheet to instantiate domain models.

Parameters:
  • workbook_data – Raw workbook data read by read_workbook.

  • sheet_name – Name of the Excel sheet to parse.

  • model_class – The domain model class to instantiate (e.g., Identity).

  • rules_file_path – Path to the excel_config.json containing the rules.

  • source – Technical name of the source (e.g., β€œgitlab”).

Returns:

List of reconstructed domain model instances.

Return type:

list[Any]