@target(...)
Decorator used to write the output of a task function.
import prism.task
import prism.target
import prism.decorators
class ExampleTask(prism.task.PrismTask):
@prism.decorators.target(
type=prism.target.Txt,
loc="/Users/hello_world.txt",
**kwargs
)
def run(self):
test_str = "Hello, world!"
return test_strfrom prism.decorators import task, target
import prism.target
@task(
targets=[
target(type=prism.target.Txt, loc="/Users/hello_world.txt")
]
)
def example_function(tasks, hooks):
test_str = "Hello, world!"
return test_strLast updated