param.rx#
- class param.rx(obj=None, **kwargs)[source]#
rx allows wrapping objects and then operating on them interactively while recording any operations applied to them. By recording all arguments or operands in the operations the recorded pipeline can be replayed if an operand represents a dynamic value.
- Parameters:
obj (any) – A supported data structure object
Examples
Instantiate it from an object:
>>> ifloat = rx(3.14) >>> ifloat * 2 6.28
Then update the original value and see the new result: >>> ifloat.value = 1 2
- __init__(obj=None, operation=None, fn=None, depth=0, method=None, prev=None, _shared_obj=None, _current=None, _wrapper=None, **kwargs)[source]#
Methods
register_accessor
(name, accessor[, predicate])Registers an accessor that extends rx with custom behavior.
register_display_handler
(obj_type, handler, ...)Registers a display handler for a specific type of object, making it possible to define custom display options for specific objects.
register_method_handler
(method, handler)Registers a handler that is called when a specific method on an object is called.
Attributes
rx
The reactive namespace.