stilt.transforms.load_transform#

stilt.transforms.load_transform(spec)[source]#

Return the transform for one config entry.

spec is either a transform already (any object with apply) or a mapping with a kind. The kind is a built-in name or the import path of a pydantic model class, which is validated from the remaining keys. Only a pydantic model can be written back to config.yaml.

Raises:

ImportError – If kind names a class that cannot be imported on this machine.

Return type:

Any

Parameters:

spec (Any)