TargetInput (autotransform.input.target)
The implementation for the TargetInput.
- class autotransform.input.target.TargetInput(*, input: Input, pattern: str, replacement: str)
Bases:
InputAn Input that attaches a target_path to the Items returned by another Input’s FileItems. These target_paths are used to alter where written content is sent to.
- pattern
The pattern to use for regex replacement of the Item’s original path.
- Type:
str
- replacement
The replacement used by regex to create the target path.
- Type:
str
- classmethod from_data(data: Dict[str, Any]) TargetInput
Produces an instance of the component from decoded data.
- Parameters:
data (Mapping[str, Any]) – The JSON decoded data.
- Returns:
An instance of the component.
- Return type:
- get_items() Sequence[FileItem]
Gets a list of files recursively contained within the path.
- Returns:
The eligible files for transformation.
- Return type:
Sequence[FileItem]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- pattern: str
- replacement: str