MCPcopy Index your code
hub / github.com/voila-dashboards/voila

github.com/voila-dashboards/voila @v0.5.12 sqlite

repository ↗ · DeepWiki ↗ · release v0.5.12 ↗
574 symbols 1,547 edges 131 files 109 documented · 19%
README

voila

Documentation Binder Discourse Zulip

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_sources 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 .binder/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
jupyter server extension enable voila

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:

https://voila.readthedocs.io/

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

Voilà basics

Rendering a notebook making use of a custom widget library (bqplot)

Voilà 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à sources

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-cpp, and the xleaflet project.

Voilà cling

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.

Extension points exported contracts — how you extend this code

IVoilaPreviewTracker (Interface)
(no doc)
packages/jupyterlab-preview/src/preview.tsx
IFederatedExtensionData (Interface)
(no doc)
packages/voila/src/tools.ts
IOptions (Interface)
(no doc)
packages/jupyterlab-preview/src/preview.tsx
IRankItem (Interface)
(no doc)
packages/voila/src/shell.ts
IOptions (Interface)
(no doc)
packages/voila/src/app.ts
IInfo (Interface)
(no doc)
packages/voila/src/app.ts
IPluginModule (Interface)
(no doc)
packages/voila/src/app.ts

Core symbols most depended-on inside this repo

get
called by 76
voila/tornado/handler.py
_
called by 30
voila/app.py
addBenchmarkToTest
called by 18
ui-tests/tests/utils.ts
add
called by 14
packages/voila/src/shell.ts
start
called by 7
voila/app.py
write_message
called by 7
voila/tornado/kernel_websocket_handler.py
createModule
called by 6
packages/voila/src/tools.ts
addWidget
called by 6
packages/voila/src/shell.ts

Shape

Function 307
Method 193
Class 62
Interface 12

Languages

Python69%
TypeScript31%

Modules by API surface

share/jupyter/voila/templates/base/static/require.min.js33 symbols
voila/app.py30 symbols
voila/voila_kernel_manager.py21 symbols
packages/voila/src/plugins/themes/thememanager.ts20 symbols
voila/utils.py19 symbols
packages/voila/src/shell.ts17 symbols
voila/notebook_renderer.py15 symbols
voila/exporter.py14 symbols
tests/app/conftest.py12 symbols
packages/jupyterlab-preview/src/preview.tsx12 symbols
voila/static_file_handler.py11 symbols
voila/handler.py11 symbols

Dependencies from manifests, versioned

@babel/core7.10.2 · 1×
@babel/preset-env7.10.2 · 1×
@jupyter-widgets/base6.0.10 · 1×
@jupyter-widgets/controls3.1.8 · 1×
@jupyter-widgets/jupyterlab-manager5.0.13 · 1×
@jupyterlab/application4.0.0 · 1×
@jupyterlab/apputils4.0.0 · 1×
@jupyterlab/apputils-extension4.0.0 · 1×
@jupyterlab/codemirror4.0.3 · 1×
@jupyterlab/codemirror-extension4.0.0 · 1×

For agents

$ claude mcp add voila \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact