@target_iterator(...)
Decorator used to write the outputs of a task function.
import prism.task
import prism.target
import prism.decorators
class ExampleTask(prism.task.PrismTask):
@prism.decorators.target_iterator(
type=prism.target.Txt,
loc="/Users/,
**kwargs
)
def run(self):
test_str = "Hello, world!"
test_str_2 = "This is a second string"
return {
"hello_world.txt": test_str,
"other_string.txt": test_str_2,
}from prism.decorators import task, target_iterator
import prism.target
@task(
targets=[
target_iterator(type=prism.target.Txt, loc="/Users/")
]
)
def example_function():
test_str = "Hello, world!"
test_str_2 = "This is a second string"
return {
"hello_world.txt": test_str,
"other_string.txt": test_str_2,
}Last updated