Papermill is map reduce for Jupyter notebooks.
Stepping away from the hyperbole, our goals for Papermill include simplifying and streamlining:
Parametrizing notebooks
Executing and collecting metrics across the notebooks
Summarize collections of notebooks
Installation
pip install papermill
Usage
Executing a parametrized notebook
import papermill as pm
pm.execute_notebook(
notebook="template.ipynb",
output="output.ipynb",
params=dict(alpha=0.1, ratio=0.001)
)
nb = pm.read_notebook("output.ipynb")
Creating a parametrized notebook and record metrics
### template.ipynb
import papermill as pm
rmse = metrics.mean_squared_error(...)
pm.record_value("rmse", rmse)
plot() # Tag this cell as "results" for extraction later
### run_and_summarize.ipynb
pm.execute_notebook(
notebook="template.ipynb",
output="output.ipynb",
params=dict(alpha=0.1, ratio=0.001)
)
# Print RMSE value saved in "output.ipynb"
nb = pm.read_notebook("output.ipynb")
nb_data = pm.fetch_notebook_data(nb)
print("rmse", nb_data["rmse"])
# Show plot found in "output.ipynb"
result_cell = pm.get_tagged_cell(nb, "results")
plot = pm.get_image_from_cell(result_cell)
pm.display_image(plot)
Metadata
Release files for papermill 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| papermill-0.4.tar.gz | 22.7 kB | Without provenance | Details for papermill-0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| papermill-0.4-py2-none-any.whl | Python 2 | none | any | Details for papermill-0.4-py2-none-any.whl |
Total release size: 31.4 kB
Release files / papermill-0.4.tar.gz
| Download URL | papermill-0.4.tar.gz |
|---|---|
| Size | 22.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6979e96b195a463d7fd6a85159f98b494a65b2c1ea6bb68c922d790252f7aa75
|
|
BLAKE2b-256 checksum How to use checksums |
0827ccfc864038ec0832d99d72e646088ee77a3eeb9cb8b4bc10147fef00c3ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / papermill-0.4-py2-none-any.whl
| Download URL | papermill-0.4-py2-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
574eab133ff71edc07154b84021be686523a9aacf61ac63da0c65c0bd8b7d52a
|
|
BLAKE2b-256 checksum How to use checksums |
e151cb854696478dd45addc4e2e136b8c97cf05d56e1befde13637c94c202ba4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for papermill 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.