Last active
June 25, 2021 16:33
-
-
Save cabreraalex/31c4d8af2a1785290ba684a234191ae5 to your computer and use it in GitHub Desktop.
widget-svelte-example example.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ipywidgets import DOMWidget | |
from traitlets import Integer, Unicode | |
from ._frontend import module_name, module_version | |
class ExampleWidget(DOMWidget): | |
"""Example widget with a counter and increment button.""" | |
_model_name = Unicode('ExampleModel').tag(sync=True) | |
_model_module = Unicode(module_name).tag(sync=True) | |
_model_module_version = Unicode(module_version).tag(sync=True) | |
_view_name = Unicode('ExampleView').tag(sync=True) | |
_view_module = Unicode(module_name).tag(sync=True) | |
_view_module_version = Unicode(module_version).tag(sync=True) | |
value = Unicode('Hello World').tag(sync=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment