Skip to main content

Control JupyterLab from Python notebooks

Project description

ipylab

Github Actions Status JupyterLite Binder Conda Version pypi npm

Control JupyterLab from Python notebooks.

The goal is to provide access to most of the JupyterLab environment from Python notebooks. For example:

  • Adding widgets to the main area DockPanel, left, right or top area
  • Build more advanced interfaces leveraging SplitPanel, Toolbar and other Lumino widgets
  • Launch arbitrary commands (new terminal, change theme, open file and so on)
  • Open a workspace with a specific layout
  • Listen to JupyterLab signals (notebook opened, console closed) and trigger Python callbacks

Try it online

Try it in your browser with Binder:

Binder

Or with JupyterLite:

JupyterLite

Examples

Add Jupyter Widgets to the JupyterLab interface

widgets-panels

Execute Commands

command-registry

Custom Python Commands and Command Palette

custom-commands

Build small applications

ipytree-example

Compatibility with RetroLab

A subset of the features can be used in RetroLab:

retrolab-example

Installation

You can install using pip:

pip install ipylab

Or with mamba / conda:

mamba install -c conda-forge ipylab

Running the examples locally

To try out the examples locally, the recommended way is to create a new environment with the dependencies:

# create a new conda environment
conda create -n ipylab-examples -c conda-forge jupyterlab ipylab ipytree bqplot ipywidgets numpy
conda activate ipylab-examples

# start JupyterLab
jupyter lab

Under the hood

ipylab can be seen as a proxy from Python to JupyterLab over Jupyter Widgets:

ipylab-diagram

Development

# create a new conda environment
mamba create -n ipylab -c conda-forge jupyter-packaging nodejs python -y

# activate the environment
conda activate ipylab

# install the Python package
python -m pip install -e ".[dev]"

# link the extension files
jupyter labextension develop . --overwrite

# compile the extension
jlpm && jlpm run build

Related projects

There are a couple of projects that also enable interacting with the JupyterLab environment from Python notebooks:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipylab-1.1.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

ipylab-1.1.0-py3-none-any.whl (101.6 kB view details)

Uploaded Python 3

File details

Details for the file ipylab-1.1.0.tar.gz.

File metadata

  • Download URL: ipylab-1.1.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for ipylab-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f39858a4d9ef6ecb82f8efeeb9f6b5a01a3a64d4f3c4f2a5fe2d58ae594de212
MD5 f1d0e9ddb55b4ad290338cf240ab83c4
BLAKE2b-256 64cb6c8cf1e58472ddd910a4f7a99491e5b368ba64c02cf79bbf746dcc55b2cf

See more details on using hashes here.

File details

Details for the file ipylab-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: ipylab-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 101.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for ipylab-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a24c29aeb7d6d8b26c150794ef30c8d9ac2e387c47ea49f9afd8fa19dcd07b62
MD5 61ee9698d9ef360a75ee2d3e045684ce
BLAKE2b-256 9818f08867a10c1c67064c5cf42c99884de7b9395ca2f0468ff346b1d2351021

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page