assets_guardian.core.domain.ports.sheet_builders๏
Classes
Port: Excel sheet builder (Plugin). |
- class assets_guardian.core.domain.ports.sheet_builders.ISheetBuilder[source]๏
Bases:
ABCPort: Excel sheet builder (Plugin).
Contract for plugins wishing to add specific sheets to the Excel referential.
- abstractmethod build(worksheet: Any, data: Any, preserved: Any, rules: Any) None[source]๏
Builds the Excel sheet for this plugin.
- Parameters:
worksheet โ The Excel sheet (ExcelWorksheet).
data โ Dictionary of collection results (source, instance) -> CollectorResult.
preserved โ Manual data extracted from the existing sheet for preservation.
rules โ Formatting and validation rules.
- abstractmethod get_rules() dict[str, Any][source]๏
Returns plugin-specific Excel formatting rules.
- abstract property preserved_columns: dict[str, dict[str, list[str]]]๏
Defines the columns to preserve per sheet.
Example:
{ 'Sheet1': {'primary_keys': ['ID'], 'columns': ['Comments']}, 'Sheet2': {'primary_keys': ['UUID'], 'columns': ['Account Type']} }
- abstract property sheet_names: list[str]๏
List of Excel sheet names managed by this builder.