Last active
June 25, 2021 16:38
-
-
Save cabreraalex/c00a66fff72d539515dcd0ccb6a1d23c to your computer and use it in GitHub Desktop.
widget-svelte-example example.py units
This file contains hidden or 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, increment button, and units string.""" | |
_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) | |
count = Integer(0).tag(sync=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment