Skip to content

sift_py.yaml.report_templates

CLASS DESCRIPTION
ReportTemplateYamlSpec

Formal spec for a report template.

FUNCTION DESCRIPTION
load_report_templates

Takes in a list of paths to YAML files which contains report templates and processes them into a list of

ReportTemplateYamlSpec

Bases: TypedDict

Formal spec for a report template.

name: Name of the report template. template_client_key: Unique client key to identify the report template. organization_id: Organization ID that the report template belongs to. tags: Tags to associate with the report template. description: Description of the report template. rule_client_keys: List of rule client keys associated with the report template. archived_date: Date when the report template was archived. Setting this field will archive the report template, and unsetting it will unarchive the report template.

ATTRIBUTE DESCRIPTION
archived_date

TYPE: NotRequired[datetime]

description

TYPE: NotRequired[str]

name

TYPE: str

organization_id

TYPE: NotRequired[str]

rule_client_keys

TYPE: List[str]

tags

TYPE: NotRequired[List[str]]

template_client_key

TYPE: str

archived_date instance-attribute

archived_date: NotRequired[datetime]

description instance-attribute

description: NotRequired[str]

name instance-attribute

name: str

organization_id instance-attribute

organization_id: NotRequired[str]

rule_client_keys instance-attribute

rule_client_keys: List[str]

tags instance-attribute

tags: NotRequired[List[str]]

template_client_key instance-attribute

template_client_key: str

load_report_templates

load_report_templates(
    paths: List[Path],
) -> List[ReportTemplateConfig]

Takes in a list of paths to YAML files which contains report templates and processes them into a list of ReportTemplateConfig objects. For more information on report templates see sift_py.report_templates.config.ReportTemplateConfig.