title: Is it possible to use iPython widgets in Flask?
body: <p>I've been using iPython widgets in a Jupyter notebook, but the extension I was depending on to enable App Mode is not working, so I've decided to try to rewrite it all to Python/Flask, but I have no idea how, or if it's at all possible, to use iPython widgets in Flask views (especially interactive)?</p>
  
  <pre><code>import ipywidgets as widgets
  
  items_layout = widgets.Layout(flex='1 1 auto',
                        width='400px', height='200px')
  
  box_layout = widgets.Layout(display='flex',
                      flex_flow='row',
                      align_items='stretch',
                      width='100%')
  
  instruction = widgets.Textarea(description="Command",
                                 value = "",
                                 layout = items_layout)
  
  code = widgets.Textarea(description="Code",  
                          value = "",
                          layout = items_layout)
  
  interactive_plot = widgets.interactive(run_code, trigger = instruction)
  
  items = [interactive_plot, code]
  box = widgets.Box(children=items, layout=box_layout)
  display(box)
  </code></pre>