punchbowl.prefect#

Attributes#

Classes#

Functions#

completion_debugger(→ None)

Run on task completion during debug mode.

failure_hook(→ None)

Run if a punch_task fails.

punch_task(→ prefect.Task | collections.abc.Callable)

Prefect task that does PUNCH special things.

punch_flow(→ prefect.Flow | collections.abc.Callable)

Prefect flow that does PUNCH special things.

_compatability_decorator(→ collections.abc.Callable)

Make wrapped functions have a .fn attribute like Prefect Flows and Tasks.

detect_if_running_in_prefect(→ bool)

Determine if we're running under Prefect.

get_logger(→ logging.Logger)

Get a logger, which will be the Prefect logger if we're running under Prefect.

Module Contents#

punchbowl.prefect.completion_debugger(task: prefect.Task, task_run: prefect.client.schemas.objects.TaskRun, state: prefect.states.State) None[source]#

Run on task completion during debug mode.

punchbowl.prefect.failure_hook(task: prefect.Task, task_run: prefect.client.schemas.objects.TaskRun, state: prefect.states.State) None[source]#

Run if a punch_task fails.

punchbowl.prefect.punch_task(func: collections.abc.Callable | None = None, **kwargs: Any) prefect.Task | collections.abc.Callable[source]#

Prefect task that does PUNCH special things.

punchbowl.prefect.punch_flow(func: collections.abc.Callable | None = None, **kwargs: Any) prefect.Flow | collections.abc.Callable[source]#

Prefect flow that does PUNCH special things.

punchbowl.prefect._compatability_decorator(func: collections.abc.Callable) collections.abc.Callable[source]#

Make wrapped functions have a .fn attribute like Prefect Flows and Tasks.

class punchbowl.prefect._CompatabilitySubmitResult(ret_val: Any)[source]#
ret_val#
result() Any[source]#
wait() None[source]#
punchbowl.prefect.detect_if_running_in_prefect() bool[source]#

Determine if we’re running under Prefect.

punchbowl.prefect.get_logger() logging.Logger[source]#

Get a logger, which will be the Prefect logger if we’re running under Prefect.

punchbowl.prefect._debug_mode#