Voilà turns Jupyter notebooks into standalone web applications
Project description
Rendering of live Jupyter notebooks with interactive widgets.
Introduction
Voilà 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 the
strip_source
option, which strips out the input cells from the rendered notebook.
Installation
Voilà can be installed with the mamba (or conda) package manager from conda-forge
mamba install -c conda-forge voila
or from PyPI
pip install voila
JupyterLab preview extension
Voilà provides a JupyterLab extension that displays a Voilà preview of your Notebook in a side-pane.
Starting with JupyterLab 3.0, the extension is automatically installed after installing voila
with pip install voila
.
If you would like to install the extension from source, run the following command.
jupyter labextension install @voila-dashboards/jupyterlab-preview
Usage
As a standalone tornado application
To render the bqplot
example notebook as a standalone app, run
voila bqplot.ipynb
.
To serve a directory of jupyter notebooks, run voila
with no argument.
For example, to render the example notebook bqplot.ipynb
from this repository with Voilà, you can first update your current environment with the requirements of this notebook (in this case in a conda environment and render the notebook with
mamba env update -f environment.yml
cd notebooks/
voila bqplot.ipynb
For more command line options (e.g., to specify an alternate port number),
run voila --help
.
As a server extension to notebook
or jupyter_server
Voilà can also be used as a Jupyter server extension, both with the notebook server or with jupyter_server.
To install the Jupyter server extension, run
jupyter serverextension enable voila --sys-prefix
When running the Jupyter server, the Voilà app is accessible from the base url
suffixed with voila
.
Documentation
To get started with using Voilà, check out the full documentation:
Examples
The 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 rendering
Rendering a notebook making use of a custom widget library (bqplot)
Showing the source code for a Voilà notebook
The sources of the Jupyter notebook can be displayed in a Voilà app if option strip_sources
is set to False
.
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 kernel xeus-cling, and the xleaflet project.
The Voilà Gallery
The Voilà Gallery is 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 the voila-gallery/gallery repository.
Development
See CONTRIBUTING.md to know how to contribute and set up a development environment.
Related projects
Voilà depends on nbconvert and jupyter_server.
License
We 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 the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file osscar-voila-0.2.10a0.tar.gz
.
File metadata
- Download URL: osscar-voila-0.2.10a0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b1e87253201e1065163713d1ac81efae2ba629903a486e07b7db8fcba3a7e55 |
|
MD5 | 116fbaec7cddfd5630bf1b83cda0ec4a |
|
BLAKE2b-256 | b89ce9d94b3d40973241ce19042b4bf489a785de2ed7d74d8decd59970edacae |
File details
Details for the file osscar_voila-0.2.10a0-py3-none-any.whl
.
File metadata
- Download URL: osscar_voila-0.2.10a0-py3-none-any.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c7d0917f87a99c77e986db71ff78c3323bf2218ed94f9d99fd524904d485047 |
|
MD5 | da8570740bbe168888a319273db62b3b |
|
BLAKE2b-256 | 9fac7930e8034ee0bd6a004c4b43d07386753679e95c5843cada3e633a72313c |