Arbitrary python commands for notebooks in JupyterLab
Project description
# jupyterlab_commands Support for arbitrary python commands in the command palette.
[![Build Status](https://travis-ci.org/timkpaine/jupyterlab_commands.svg?branch=master)](https://travis-ci.org/timkpaine/jupyterlab_commands) [![GitHub issues](https://img.shields.io/github/issues/timkpaine/jupyterlab_commands.svg)]() [![codecov](https://codecov.io/gh/timkpaine/jupyterlab_commands/branch/master/graph/badge.svg)](https://codecov.io/gh/timkpaine/jupyterlab_commands) [![PyPI](https://img.shields.io/pypi/l/jupyterlab_commands.svg)](https://pypi-hypernode.com/pypi/jupyterlab_commands) [![PyPI](https://img.shields.io/pypi/v/jupyterlab_commands.svg)](https://pypi-hypernode.com/pypi/jupyterlab_commands) [![npm](https://img.shields.io/npm/v/jupyterlab_commands.svg)](https://www.npmjs.com/package/jupyterlab_commands)
## About This code lets you inject arbitrary commands into the JLab frontend. There are a variety of reasons why one might want to execute python commands outside of a notebook and a console:
a predefined NBConvert function that you dont want included in the converted result
interacting with VCS without including that interaction in the notebook
etc…
### Example Here is an example where I inject a custom command to produce HTML reports from my notebooks, while hiding the code and doing some custom CSS formatting via an NBConvert template. ![](https://raw.githubusercontent.com/timkpaine/jupyterlab_commands/master/docs/example.gif)
#### jupyter_notebook_config.py ![](https://raw.githubusercontent.com/timkpaine/jupyterlab_commands/master/docs/1.png)
#### command palette ![](https://raw.githubusercontent.com/timkpaine/jupyterlab_commands/master/docs/2.png)
#### terminal log ![](https://raw.githubusercontent.com/timkpaine/jupyterlab_commands/master/docs/3.png)
## Install `bash pip install jupyterlab_commands jupyter labextension install jupyterlab_commands jupyter serverextension enable --py jupyterlab_commands `
## Adding commands install the server extension, and add the following to jupyter_notebook_config.py
`python3 c.JupyterLabCommands.commands = {'command display name': python_function, ...} `
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
Hashes for jupyterlab_commands-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e844c4205f4d32f01a19774aa7b0d13d44372b8f932db43a22a8da9c41c471c |
|
MD5 | 8ada721f9879dbbf1c2f849347e3b226 |
|
BLAKE2b-256 | 76dfda85028c33809d630cac01b76467e9590c612cb6bef2c188684c9e3d9ccd |