leaf_engine_flows

Subpackages

Submodules

Functions

notify_slack(→ prefect.engine.state.State)

Custom Slack notification method. Can be used as state_handler for both

run_flow(→ Tuple[str, str])

Registers and runs flow on Prefect Server.

Package Contents

leaf_engine_flows.notify_slack(tracked_obj: prefect.Flow | prefect.Task, old_state: prefect.engine.state.State, new_state: prefect.engine.state.State) prefect.engine.state.State

Custom Slack notification method. Can be used as state_handler for both flows and tasks.

Parameters:
  • tracked_obj (Union[Flow, Task]) – Flow or Task to notify about. Passed in by Prefect.

  • old_state (State) – State object passed in by Prefect.

  • new_state (State) – State object passed in by Prefect.

Returns:

State object used by Prefect.

Return type:

State

leaf_engine_flows.run_flow(flow: prefect.Flow, flow_run_name: str, parameters: dict, project_name: str = 'core') Tuple[str, str]

Registers and runs flow on Prefect Server.

Parameters:
  • flow (Flow) – The flow to run.

  • parameters (dict) – Flow parameters.

  • project_name (str, optional) – Defaults to “Core”.

  • register (bool, optional) – Whether to register the flow with the server. Defaults to True.

  • flow_run_name (str) –

Returns:

_description_

Return type:

Tuple[str, str]