Create beautiful reactive GUIs for Python packages using Markdown and a few custom HTML elements

45 views
Skip to first unread message

Simon Biggs

unread,
Feb 13, 2018, 2:56:58 AM2/13/18
to Project Jupyter

Scripted Forms


https://github.com/SimonBiggs/scriptedforms


Quickly create beautiful reactive GUIs for Python packages using Markdown and a few custom HTML elements. Under the hood it uses the Jupyter Notebook server, Angular, Angular Material, Phosphor and JupyterLab.


Display is based upon the cell output within JupyterLab's notebook so most items that display within the notebook should work here.


To quickly take it for a spin write:


pip install scriptedforms


Then open a python prompt (not an ipython prompt) and copy in the following:


import scriptedforms as sf

# workaround for https://github.com/SimonBiggs/scriptedforms/issues/24
def create_file(filename, contents):
    with open(filename, 'w') as f:
        f.write(contents)

filename = 'quick-start.md'
markdown_contents = """
# An example

<section-live>

<variable-string>your_name</variable-string>

`print('Hello {}!'.format(your_name))`

</section-live>"""

create_file(filename, markdown_contents)
sf.load(filename)


See https://github.com/SimonBiggs/scriptedforms for how you can then edit the resulting markdown file and how you can use Scripted Forms to quickly make GUIs for your python package utilities.


Cheers,

Simon



Reply all
Reply to author
Forward
0 new messages