import luigi class MyTask(luigi.Task): date = luigi.DateParameter() def requires(self): return MyDependentTask(self.date) def run(self): with self.output().open('w') as output: with self.input().open('r') as input: for line in input: ret = do_something(line) output.write(ret) output.write('\n') def output(self): return luigi.LocalTarget('./out2_{0}.txt'.format(self.date.isoformat())) class MyDepen