pydra.mark.functions module

Decorators to apply to functions used in Pydra workflows

pydra.mark.functions.annotate(annotation)[source]

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)[source]

Promote a function to a FunctionTask.

Example

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