param.depends#
- param.depends(*dependencies: str, watch: bool = False, on_init: bool = False) Callable[[CallableT], DependsFunc[CallableT]] [source]#
- param.depends(*dependencies: Parameter, watch: bool = False, on_init: bool = False, **kw: Parameter) Callable[[CallableT], DependsFunc[CallableT]]
Annotates a function or Parameterized method to express its dependencies.
The specified dependencies can be either be Parameter instances or if a method is supplied they can be defined as strings referring to Parameters of the class, or Parameters of subobjects (Parameterized objects that are values of this object’s parameters). Dependencies can either be on Parameter values, or on other metadata about the Parameter.
- Parameters:
watch (bool, optional) – Whether to invoke the function/method when the dependency is updated, by default False
on_init (bool, optional) – Whether to invoke the function/method when the instance is created, by default False