leaf_engine_flows ================= .. py:module:: leaf_engine_flows Subpackages ----------- .. toctree:: :maxdepth: 1 /autoapi/leaf_engine_flows/automations/index /autoapi/leaf_engine_flows/core/index Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/leaf_engine_flows/config/index /autoapi/leaf_engine_flows/flow/index /autoapi/leaf_engine_flows/notify/index /autoapi/leaf_engine_flows/register/index /autoapi/leaf_engine_flows/run/index /autoapi/leaf_engine_flows/serializer/index /autoapi/leaf_engine_flows/task/index Functions --------- .. autoapisummary:: leaf_engine_flows.notify_slack leaf_engine_flows.run_flow Package Contents ---------------- .. py:function:: notify_slack(tracked_obj: Union[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. :param tracked_obj: Flow or Task to notify about. Passed in by Prefect. :type tracked_obj: Union[Flow, Task] :param old_state: State object passed in by Prefect. :type old_state: State :param new_state: State object passed in by Prefect. :type new_state: State :returns: State object used by Prefect. :rtype: State .. py:function:: 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. :param flow: The flow to run. :type flow: Flow :param parameters: Flow parameters. :type parameters: dict :param project_name: Defaults to "Core". :type project_name: str, optional :param register: Whether to register the flow with the server. Defaults to True. :type register: bool, optional :returns: _description_ :rtype: Tuple[str, str]