denselinkage.serializing.TemplateSerializer¶
- class denselinkage.serializing.TemplateSerializer(template: str, *, column_mapping: Mapping[str, str] | None = None)[source]¶
Bases:
Serializer"Name: {name}";column_mappingmaps this source’s columns onto the template variables.Security:
templateis trusted, developer-supplied configuration. It is rendered withstr.format_mapover each row, so do not build it from untrusted input — a hostile template could read attributes of the substituted values (the standardstr.formatinjection vector). Field values are only substituted, never parsed, so untrusted row data is safe.