nbkickoff
Launch an IPython Notebook from a template notebook file.
Requirements
Tested with:
- Jupyter Notebook 5.5 (or higher)
- Python 3.6
Should also work with other Python 3.x versions.
Installation
For general use, you can install nbkickoff using pip:
pip install nbkickoff
To upgrade to the latest version:
pip install -U nbkickoff
For local development:
git clone https://github.com/lumicks/nbkickoff.git
cd nbkickoff
pip install -e .
Usage
Invoke using either the full:
python -m nbkickoff TEMPLATEFILE TARGETFILE [VAR=VALUE [VAR2=VALUE ...]]
Or, if the corresponding entry point script is on the PATH, the shorter version:
nbkickoff TEMPLATEFILE TARGETFILE [VAR=VALUE [VAR2=VALUE ...]]
Here, TEMPLATEFILE is an IPython Notebook file that functions as a template. This file is copied to TARGETFILE (which must not exist yet), after which all variables in the notebook's cells are substituted with their corresponding values.
So, if your template notebook contains a cell with the text:
my_python_var = '{{ foo }}'
and you invoke nbkickoff using:
nbkickoff template.ipynb my_notebook.ipynb foo=bar
Then your shiny new notebook will have a cell containing:
my_python_var = 'bar'
If a suitable Jupyter server process is already running, nbkickoff opens the new notebook in the existing server. Otherwise, a new Jupyter server process is started. This behavior is based on that of the nbopen tool, with the notable change that nbkickoff always returns immediately; any newly spawned Jupyter server process is detached.
Metadata
Release files for nbkickoff 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nbkickoff-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / nbkickoff-0.1.0-py3-none-any.whl
| Download URL | nbkickoff-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f350894de9ba1895a4c10caed01fb4b358ced01e4559306805b9074d1f26f33b
|
|
BLAKE2b-256 checksum How to use checksums |
b26a46a7121bd7f73fcf83863e4949f6dc8628f531a0e9dffd446b87efaa92fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |