qkrun.group

qkrun.group(obj: Callable) → Group
qkrun.group(**kwargs: Unpack[CommonTaskKwargs]) → PartialReturnType[Group]

Create a group task from a function.

The returned task will run in the same order without extra arguments. To add arguments to individual tasks in the group, you can use functools.partial().

@group(args=["arg1"])
def my_group(arg1):
    return [task1, functools.partial(task2, arg1)]
Parameters:
  • obj – The function to create the group task from.

  • kwargs – Common keyword arguments for tasks. See CommonTaskKwargs for more information.

Returns:

The group task class, or, if obj is None, a partial function to be used as a decorator for a function.