在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:pbugnion/ipywidgets_server开源软件地址:https://github.com/pbugnion/ipywidgets_server开源编程语言:JavaScript 56.0%开源软件介绍:[Unmaintained] Jupyter widgets serverThis project is in sunset mode. It is no longer actively maintained. To serve widgets and rich outputs, we recommend using voila instead. See this issue for a discussion. Ever wanted to display Jupyter widgets outside of a notebook environment? This lets you do it. For more information, view the docs page. Warnings You probably should not use this in production yet. This only supports Python 3.6 at present (PRs welcome)! InstallationYou should install ipywidgets_server with
To install from source, clone this repository and run:
UsageCreate a python file (not a notebook) that renders your favourite widget. Let's, for
instance, create a file called # example.py
from ipywidgets import IntSlider, Text, VBox
s = IntSlider(max=200, value=100)
t = Text()
def update_text(change=None):
t.value = str(float(s.value) ** 2)
s.observe(update_text, names='value')
update_text()
vbox = VBox([s, t]) To serve the widget, go to the directory containing
This will serve the widget on The command line argument is For information on other command line arguments, run:
Credit where it's dueMuch of the frontend code for this is inspired by the web3 example in ipywidgets. The original idea of writing a custom kernel to stop arbitrary code execution on the server came from Maarten Breddels. Most of the implementation is inspired by various parts of ipywidgets and Jupyter. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论