This notebook illustrates basic functionality with the model package that apply complex transformations on certificates.

Note: You probably don’t need to use this. Instead, you should use CCDataset or FIPSDataset classes to handle the transformations for yourself.

from sec_certs.dataset.common_criteria import CCDataset
from sec_certs.model import SARTransformer
dset: CCDataset = CCDataset.from_web_latest()


transformer = SARTransformer().fit(dset.certs.values())
extracted_sars = {x.dgst: transformer.transform_single_cert(x) for x in dset}