Andy
02/22/2021, 2:48 PMflow = load('{project_name}.{flow})
and flow.run()
which would then show up in the Prefect UI?Samuel Hinton
02/22/2021, 2:49 PMfrom prefect.client import Client
client = Client("<http://localhost:4200/graphql>")
client.create_flow_run(flow_id)
is what you want. If you register a flow, you get the id back, so you can register and run using the API. I dont know of a good way of saying “whats the latest id for a flow with this name” so if you figure that out please let me know!Dylan
(prefect) dylanhughes@Dylans-MacBook-Pro-Prefect ~> prefect run
Usage: prefect run [OPTIONS] COMMAND [ARGS]...
Run Prefect flows.
Usage:
$ prefect run [STORAGE/PLATFORM]
Arguments:
flow Run a flow with a backend API
Examples:
$ prefect run flow --name Test-Flow --project My-Project -ps '{"my_param": 42}'
Flow Run: <https://cloud.prefect.io/myslug/flow-run/2ba3rrfd-411c-4d99-bb2a-f64a6dea78f9>
$ prefect run flow --name Test-Flow --project My-Project --watch
Flow Run: <https://localhost:8080/flow-run/2ba3rrfd-411c-4d99-bb2a-f64a6dea78f9>
Scheduled -> Submitted -> Running -> Success
Options:
-h, --help Show this message and exit.
Andy
02/22/2021, 3:11 PM