Skip to content

A JupyterLab extension that populates notebooks with URL parameters.

License

Notifications You must be signed in to change notification settings

ucsd-ets/jupyterlab-notebookparams

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jupyterlab-notebookparams

A JupyterLab extension that populates notebooks with URL parameters.

Functionality lifted from https://github.com/manics/jupyter-notebookparams and made into a jupyterlab extension.

Prerequisites

  • JupyterLab

Installation

jupyter labextension install @dafeliton/jupyterlab-notebookparams

Usage

Create a notebook cell that starts with the exact string # Parameters: Add parameters to the URL of a notebook, e.g. http://example.org/notebook.ipynb?a=1&b=False. The content of the first cell starting with # Parameters: will be replaced with the passed parameters, e.g.

# Parameters:
a = 1
b = False

Add the parameter autorun=true to automatically run the notebook.

WARNING: This extension does not parse the parameter values so arbitrary code can be executed in the parameter value.

Development

For a development install (requires npm version 4 or later), do the following in the repository directory:

npm install
npm run build
jupyter labextension link .

To rebuild the package and the JupyterLab app:

npm run build
jupyter lab build

About

A JupyterLab extension that populates notebooks with URL parameters.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%