Reactive API#

bind(function, *args[, watch])

Given a function, returns a wrapper function that binds the values of some or all arguments to Parameter values and expresses Param dependencies on those values, so that the function can be invoked whenever the underlying values change and the output will reflect those updated values.


rx allows wrapping objects and then operating on them interactively while recording any operations applied to them.

These methods and properties are available under the .rx namespace of reactive expressions (rx).


__bool__ cannot be implemented so it is provided as a method.


Replacement for the in statement.


Replacement for the is statement.


Replacement for the is not statement.


__len__ cannot be implemented so it is provided as a method.

pipe(func, /, *args, **kwargs)

Apply chainable functions.


Returns a new expression that is True while the expression is updating.

when(*dependencies[, initial])

Returns a reactive expression that emits the contents of this expression only when the dependencies change.

where(x, y)

Returns either x or y depending on the current state of the expression, i.e. replaces a ternary if statement.


Returns the current state of the reactive expression by evaluating the pipeline.

watch([fn, onlychanged, queued, precedence])

Adds a callable that observes the output of the pipeline.