Package: voila
Rendering of live Jupyter notebooks with interactive widgets.IntroductionVoilà turns Jupyter notebooks into standalone web applications.Unlike the usual HTML-converted notebooks, each user connecting to the Voilà
tornado application gets a dedicated Jupyter kernel which can execute the
callbacks to changes in Jupyter interactive widgets.By default, Voilà disallows execute requests from the front-end, preventing
execution of arbitrary code.By default, Voilà runs with thestrip_sourcesoption, which strips out the
input cells from the rendered notebook.InstallationVoilà can be installed with the mamba (or conda) package manager from conda-forgemamba install -c conda-forge voilaor from PyPIpip install voilaJupyterLab preview extensionVoilà provides a JupyterLab extension that displays a Voilà preview of your Notebook in a side-pane.Starting with JupyterLab 3.0, the extension isautomatically installedafter installingvoilawithpip install voila.If you would like to install the extension from source, run the following command.jupyter labextension install @voila-dashboards/jupyterlab-previewUsageAs a standalone tornado applicationTo render thebqplotexample notebook as a standalone app, runvoila bqplot.ipynb.
To serve a directory of jupyter notebooks, runvoilawith no argument.For example, to render the example notebookbqplot.ipynbfrom this repository with Voilà, you can first update your current environment with the requirements of this notebook (in this case in aconda environmentand render the notebook withmamba env update -f .binder/environment.yml
cd notebooks/
voila bqplot.ipynbFor more command line options (e.g., to specify an alternate port number),
runvoila --help.As a server extension tonotebookorjupyter_serverVoilà can also be used as a Jupyter server extension, both with thenotebookserver or withjupyter_server.To install the Jupyter server extension, runjupyter serverextension enable voila
jupyter server extension enable voilaWhen running the Jupyter server, the Voilà app is accessible from the base url
suffixed withvoila.DocumentationTo get started with using Voilà, check out the full documentation:https://voila.readthedocs.io/ExamplesThe following two examples show how a standalone Jupyter notebook can be turned into a separate app, from the command-line integration.Rendering a notebook including interactive widgets and rich mime-type renderingRendering a notebook making use of a custom widget library (bqplot)Showing the source code for a Voilà notebookThe sources of the Jupyter notebook can be displayed in a Voilà app if optionstrip_sourcesis set toFalse.Voilà dashboards with other language kernels**Voilà is built upon Jupyter standard formats and protocols, and is agnostic to the programming language of the notebook. In this example, we present an example of a Voilà application powered by the C++ Jupyter kernelxeus-cling, and thexleafletproject.The Voilà GalleryTheVoilà Galleryis a collection of live dashboards and applications built with Voilà and Jupyter widgets.Most of the examples rely on widget libraries such as ipywidgets, ipyleaflet, ipyvolume, bqplot and ipympl, and showcase how to build complex web applications entirely based on notebooks.New examples can be added to the gallery by following the steps listed in thevoila-gallery/galleryrepository.DevelopmentSeeCONTRIBUTING.mdto know how to contribute and set up a development environment.Related projectsVoilà depends onnbconvertandjupyter_server.LicenseWe use a shared copyright model that enables all contributors to maintain the
copyright on their contributions.This software is licensed under the BSD-3-Clause license. See theLICENSEfile for details.