@target(...)
Decorator used to write the output of a task function.
prism.decorators.target(
*, type: prism.target.PrismTarget, loc: Union[str, pathlib.Path]
)
Parameters
*
: indicates that thetarget
decorator only accepts keyword arguments.type
: a valid Prism target. This controls the output type, e.g., a.txt
file, a.csv
, a.json
, etc. Prism targets are classes that inherit theprism.target.PrismTarget
class and implement thesave
method. See here.loc
: a string or path-like object that controls where the output saved.
Example: