A JupyterLab extension that lets you register arbitrary Python functions as commands in the command palette.
nteract/papermill
A Python tool that parameterizes, executes, and analyzes Jupyter notebooks from the command line or a Python API.
- Stars
- 6,498
- Forks
- 465
- Open issues
- 198
- Last commit
- last month
What is it?
Papermill runs Jupyter notebooks with parameters you supply at execution time. You tag a cell with `parameters` to define defaults, and Papermill injects a new cell with the values you pass in, so the same notebook can produce different outputs for different inputs, such as a monthly report run with different dates.
Notebooks can be executed through the Python API with `execute_notebook`, or through the `papermill` command line with options for passing parameters as strings, typed values, YAML files, or base64-encoded YAML. Input and output paths can point to local files, HTTP(S) URLs, AWS S3, Azure Data Lake or Blob Storage, or Google Cloud Storage.
Because execution is scriptable, papermill fits into data pipelines where one notebook's results determine which notebook runs next. Optional extras such as `s3` or `azure` install the storage dependencies, and the `black` extra formats injected parameters.
Key features
- 01Injects parameters into a tagged cell so one notebook can run with different inputs.
- 02Executes notebooks from the Python API or the papermill command line.
- 03Accepts parameters as typed values, raw strings, YAML files, or YAML strings.
- 04Reads and writes notebooks on local disk, HTTP(S), S3, Azure, and Google Cloud Storage.
- 05Supports optional Black formatting of injected parameters.
Use cases
- Running the same financial or analytics report with different dates or settings.
- Chaining notebooks in a data pipeline where the output of one decides the next step.
- Batch-executing notebooks stored in cloud object storage as part of scheduled jobs.
Quick start
- 1
Install papermill from PyPI
pip install papermill - 2
Tag a notebook cell with 'parameters' and run it with a parameter via the CLI
papermill local/input.ipynb local/output.ipynb -p alpha 0.6 -p l1_ratio 0.1
Things to know
- Supports Python 3.10 and newer only.
Topics
FAQ
- What is papermill?
- A Python tool that parameterizes, executes, and analyzes Jupyter notebooks from the command line or a Python API. Papermill runs Jupyter notebooks with parameters you supply at execution time. You tag a cell with `parameters` to define defaults, and Papermill injects a new cell with the values you pass in, so the same notebook can produce different outputs for different inputs, such as a monthly report run with different dates.
- Is papermill free to use? What license does it have?
- papermill is open source under the BSD-3-Clause license. Check the license terms before using it in commercial products.
- Is papermill still maintained?
- Updated within 6 months. The last commit to papermill was on Oct 5, 2026.
- What can I use papermill for?
- Running the same financial or analytics report with different dates or settings. Chaining notebooks in a data pipeline where the output of one decides the next step. Batch-executing notebooks stored in cloud object storage as part of scheduled jobs.
- How do I install papermill?
- Install papermill from PyPI: pip install papermill Tag a notebook cell with 'parameters' and run it with a parameter via the CLI: papermill local/input.ipynb local/output.ipynb -p alpha 0.6 -p l1_ratio 0.1
- Where can I get papermill?
- The source code and installation instructions are on GitHub: https://github.com/nteract/papermill
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Nix-based framework for declarative, reproducible JupyterLab environments with configurable kernels and extensions.
Stores Jupyter notebooks as plain Markdown or Python, Julia, R scripts so they diff and version cleanly in Git.
Builds a git repository into a Jupyter-enabled Docker image based on the configuration files found in that repo.
A JupyterLab extension and Python package for writing unit tests against individual cells of linearly executed notebooks, such as report notebooks.
A reactive Python notebook that auto-reruns dependent cells, stores notebooks as plain .py files, and can run as scripts or deployed apps.