pydra.mark.functions module

Decorators to apply to functions used in Pydra workflows

pydra.mark.functions.annotate(annotation)

Update the annotation of a function.

Example

>>> import pydra
>>> @pydra.mark.annotate({'a': int, 'return': float})
... def square(a):
...     return a ** 2.0
pydra.mark.functions.task(func)

Promote a function to a FunctionTask.

Example

>>> import pydra
>>> @pydra.mark.task
... def square(a: int) -> float:
...     return a ** 2.0