Calvin Pritchard
test.py
from prefect import task, Flow from prefect.engine.results import LocalResult OUTPUT_DIR = './outputs' @task(target='x.txt', checkpoint=True, result=LocalResult(dir=OUTPUT_DIR)) def saver(): return 10 with Flow('example') as flow: saved = saver() flow.run()
python test.py
tree
. ├── outputs │ └── x.txt └── test.py
x.txt
. ├── outputs └── test.py
prefect==0.14.12
prefect
Jim Crist-Harif
flow.run()
~/.prefect/config.toml
# Through environment variables export PREFECT__FLOWS__CHECKPOINTING=true
# ~/.prefect/config.toml [flows] checkpointing = true
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.