Skip to content

Instantly share code, notes, and snippets.

@cicdw
Created April 30, 2019 22:04
Show Gist options
  • Save cicdw/d18e7fa8f1e0824219686380332d5bb5 to your computer and use it in GitHub Desktop.
Save cicdw/d18e7fa8f1e0824219686380332d5bb5 to your computer and use it in GitHub Desktop.
from prefect import task, Parameter, Flow
@task
def return_param(p):
return p
with Flow("parameter-example") as flow:
p = Parameter("p", default=42)
result = return_param(p)
flow.run() # uses the value 42
flow.run(p=99) # uses the value 99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment