endomill

https://img.shields.io/pypi/v/endomill.svg https://img.shields.io/travis/mmore500/endomill.svg Documentation Status

endomill lets a Jupyter notebook instantiate itself as a papermill template.

Plays nice across both interactive and automatic (i.e., nbconvert, nbclient) contexts.

Here’s what cells from a notebook using endomill might look like.

import endomill

Instantiate & execute this two copies of this notebook.

endomill.instantiate_over(
    parameter_packs=[
        {'parameter' : 'value1'},
        {'parameter' : 'value2'},
    ],
)

Supply papermill parameters. (Remember to add notebook cell “parameters” tag for papermill.)

# register papermill parameters
parameter: str

Override automatic endomill instance output path, if desired.

endomill.add_instance_outpath('custom_outpath.endomill.ipynb')

Then do your Jupyter business as usual!

print('hello', parameter)

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.