Theo Platt
04/20/2023, 7:03 PMfrom prefect.client.client import Client
c = Client(api_token='xxxxxxxxxx')
params = {'param1': 'Foo', 'param2': 'Bar'}
c.create_flow_run(
version_group_id='xxxx-xxxxxx-xxxxxx-xxxxx',
run_name='my_run_name',
parameters = params)
But I can't see a good example of how to do the same with v2! I think I'm missing something fundamental! ThanksZanie
run_deployment
Zanie
Theo Platt
04/20/2023, 7:05 PMTheo Platt
04/20/2023, 9:26 PMZanie
prefect cloud login
— the variables needed for authentication in other contexts can then be viewed with prefect config view
(the API URL and API KEY are the relevant ones).
You don’t need to provide a client manually to run_deployment
it’ll read settings from the environment.Zanie
prefect deployment run hello/test
you’d do run_deployment(name="hello/test")
Theo Platt
04/20/2023, 9:43 PMTheo Platt
04/20/2023, 10:11 PMZanie