param.depends#

param.depends(func, *dependencies, watch=False, on_init=False, **kw)[source]#

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