Skip to content

consideRatio/jupyterlab-sidecar

 
 

Sidecar

Build Status codecov

A sidecar output widget for JupyterLab

Installation

If you use jupyterlab:

pip install sidecar
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install @jupyter-widgets/jupyterlab-sidecar

Usage

The sidecar widget is used as a context manager, just like ipywidgets' output widget.

from sidecar import Sidecar
from ipywidgets import IntSlider

sc = Sidecar(title='Sidecar Output')
sl = IntSlider(description='Some slider')
with sc:
    display(sl)

When a single output is displayed in a Sidecar, it is allowed to occupy all of the vertical space available. If more content is displayed, the natural height is used instead.

sidecar

Development

# Create a new conda environment
conda create -n jupyterlab-sidecar -c conda-forge jupyterlab ipywidgets nodejs

# Activate the conda environment
conda activate jupyterlab-sidecar

# Install dependencies
jlpm

# Build Typescript source
jlpm build

# Link your development version of the extension with JupyterLab
jupyter labextension link .

# Rebuild Typescript source after making changes
jlpm build

# Rebuild JupyterLab after making any changes
jupyter lab build

# Install the sidecar Python package
python -m pip install -e .

About

A sidecar output widget for JupyterLab

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 74.7%
  • TypeScript 21.1%
  • JavaScript 2.5%
  • CSS 1.7%