papermill is a Python library and command-line tool that transforms Jupyter Notebooks into repeatable, parameterized workflows by allowing users to define editable parameters within notebooks and then programmatically execute them with different inputs. Instead of manually opening and running a notebook inside JupyterLab or Notebook every time, Papermill lets you inject new values into a specially tagged parameters cell and execute the entire notebook automatically via a script or automation pipeline, which enables robust automation of data analysis, reports, and experiments. This capability is particularly useful in data science and analytics, where a template notebook might be reused for batching reports across dates, customers, or other variables without rewriting code or duplicating notebooks. Papermill supports both Python API usage and a command-line interface, making it flexible for integration with CI/CD systems, shells, and workflow orchestration tools like Airflow.
Features
- Parameter injection into Jupyter notebooks
- Automated execution via Python API and CLI
- Output retention including plots and logs
- Notebook inspection for parameter discovery
- Integration with workflow tools like Airflow
- Reusable data analysis templates and workflows