Skip to content

manzt/ipytweakpane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(ipy)tweakpane

PyPI License

IPython/Jupyter notebooks module for Tweakpane UI.

installation

pip install tweakpane

example

import tweakpane

pane = tweakpane.Pane()

pane.add_input("checkbox", True)
pane.add_input("number", 10.00)
pane.add_input("slider", 10, min=0, max=200)

with pane.folder(title="Folder") as f:
    f.add_input("color", dict(r=255, g=200, b=100))
    f.add_input("text", "Tweakpane")

pane

example widget

Inputs are dynamically added to the pane as named traitlets and can be subscribed to or updated like any other ipywidget.

# subscribe to changes
pane.observe(lambda change: ..., names=[
    "checkbox",
    "number",
    "slider",
    "color",
    "text",
])

# update pane programatically
pane.checkbox = False
pane.text = "Some other text"

release

git tag -a vX.X.X  -m "X.X.X"
git push --follow-tags