copy()ΒΆ
- hamilton.dataflows.copy(dataflow: ModuleType, destination_path: str, overwrite: bool = False, renamed_module: str = None)ΒΆ
Copies a dataflow module to the passed in path.
from hamilton import dataflows # dynamically pull and then copy NAME_OF_DATAFLOW = dataflow.import_module("NAME_OF_DATAFLOW", "NAME_OF_USER") dataflow.copy(NAME_OF_DATAFLOW, destination_path="PATH_TO_DIRECTORY") # copy from the installed library from hamilton.contrib.user.NAME_OF_USER import NAME_OF_DATAFLOW dataflow.copy(NAME_OF_DATAFLOW, destination_path="PATH_TO_DIRECTORY")
- Parameters:
dataflow β the module to copy.
destination_path β the path to a directory to place the module in.
overwrite β whether to overwrite the destination. Default is False and raise an error.
renamed_module β whether to rename the copied module. Default is None and will use the original name.