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, tasks, hooks):
test_str = "Hello, world!"
previous_task_output = tasks.ref("first_task")
return test_str + previous_task_output
from prism.decorators import task
@task()
def example_function(tasks, hooks):
test_str = "Hello, world!"
previous_task_output = tasks.ref("first_task")
return test_str + previous_task_output