callback_serialization_wrap#
- k3d.helpers.callback_serialization_wrap(name: str) Dict[str, Any][source]#
Return a wrap of the serialization and deserialization functions for mouse actions.
- Parameters:
name (str) – Name of the property.
- Returns:
Dictionary with ‘to_json’ and ‘from_json’ functions.
- Return type:
dict
Note
This function is used along with the ipywidgets package, which provides custom object serializations.
See ipywidgets documentation for more informations.
Examples#
# Example from objects.DrawableWithCallback
click_callback = Any(default_value=None, allow_none=True).tag(sync=True, **callback_serialization_wrap("click_callback"))