jpuris
03/27/2023, 10:55 AMpython flows/flow.py
and parameters are filled in via
if __name__ == "__main__":
my_flow(
parameter_1=value_1,
parameter_2=value_2,
parameter_3=value_3,
)
I do not want my_flow
run to be registered on prefect cloud due to many different reasons 😞
How can I achieve this?Deceivious
03/27/2023, 12:20 PMprefect server start
Ryan Peden
03/27/2023, 1:05 PMprefect profile create local
and then prefect profile use local
.
Or, something like this should work as well:
# your code here
if __name__ == "__main__":
from prefect.settings import temporary_settings, PREFECT_API_URL
with temporary_settings(restore_defaults={PREFECT_API_URL}):
my_flow(
parameter_1=value_1,
parameter_2=value_2,
parameter_3=value_3,
)
jpuris
03/27/2023, 3:12 PMjpuris
03/27/2023, 3:13 PMRyan Peden
03/27/2023, 3:15 PMDeceivious
03/27/2023, 4:01 PMjpuris
03/27/2023, 4:02 PMDeceivious
03/27/2023, 4:03 PMjpuris
03/27/2023, 4:04 PMDeceivious
03/27/2023, 4:05 PMjpuris
03/27/2023, 4:07 PMjpuris
03/27/2023, 4:07 PMAustin Weisgrau
03/27/2023, 4:26 PMfrom prefect.testing.utilities import prefect_test_harness
with prefect_test_harness():
my_flow()
jpuris
03/27/2023, 4:27 PM