papermill-tenki
A papermill engine that executes parameterized Jupyter notebooks inside disposable Tenki Sandbox microVMs.
Parameter injection happens locally in papermill as usual; the already
parameterized notebook is uploaded to a fresh sandbox, executed there with
jupyter nbconvert --execute, and the executed notebook (outputs, plots,
errors) is downloaded and saved to papermill's output path. The sandbox is
destroyed afterwards.
Install
pip install papermill-tenki
Setup
export TENKI_API_KEY=tk_... # from your Tenki workspace settings
Usage
CLI (-p name value injects a notebook parameter, only if the notebook has a
parameters cell that declares it):
papermill input.ipynb output.ipynb --engine tenki -p learning_rate 0.5
Python:
import papermill
papermill.execute_notebook(
"input.ipynb",
"output.ipynb",
engine_name="tenki",
# notebook parameters — only for notebooks with a `parameters` cell; omit otherwise:
parameters={"learning_rate": 0.5},
# optional engine kwargs (override env vars); see Configuration below:
# image="...", sandbox_name="my-run",
# cpu_cores=4, memory_mb=8192,
)
bootstrap is enabled by default and installs the jupyter toolchain in the
sandbox for you — only set bootstrap=False if your image already has it.
Configuration
| Engine kwarg | Env var | Default | Meaning |
|---|---|---|---|
image |
TENKI_IMAGE |
Tenki default | Sandbox image |
sandbox_name |
— | papermill |
Sandbox display name |
bootstrap |
TENKI_BOOTSTRAP |
enabled | pip-install nbconvert/ipykernel when missing |
cpu_cores |
— | Tenki default | Sandbox CPU cores |
memory_mb |
— | Tenki default | Sandbox memory |
max_duration |
— | from execution_timeout |
Lifetime backstop (s); a crashed run can't orphan the VM |
create_timeout |
— | 300 |
Seconds to wait for the sandbox to reach RUNNING |
TENKI_API_KEY is read by the Tenki SDK itself, which also resolves the
workspace the sandbox is created in.
Notebook dependencies (numpy, pandas, ...) must exist in the sandbox: bake
them into a custom image, or add a bootstrap cell at the top of the notebook.
The kernel requested by the notebook must be installed in the sandbox; when it
isn't and python3 is available, the engine falls back to python3 with a
warning.
Timeouts
papermill's --start-timeout and --execution-timeout are forwarded to the
remote nbconvert run (startup_timeout / timeout on the
ExecutePreprocessor).
Tests
pip install -e .[dev]
pytest # unit tests, fully mocked, no network
TENKI_API_KEY=... pytest tests/test_live_smoke.py # live smoke test
Metadata
Release files for papermill-tenki 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| papermill_tenki-0.2.1.tar.gz | 9.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| papermill_tenki-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.8 kB
Release files / papermill_tenki-0.2.1.tar.gz
| Download URL | papermill_tenki-0.2.1.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c61e7b8e129a93499feef7dac9a152c1bfac40d063b73496824fca3d0692bf7
|
|
BLAKE2b-256 checksum How to use checksums |
cccd3f5546728eb64deacb2dce5ab64af34bfab080361170c4cbd51ff465111f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.
Transparency logRelease files / papermill_tenki-0.2.1-py3-none-any.whl
| Download URL | papermill_tenki-0.2.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f648f4291419594232877a841787880310f998b8b350f1c2bc215ca013f5071
|
|
BLAKE2b-256 checksum How to use checksums |
8a367c67cb4803763f96a43cc90783aff0a445a71470442e30f705b9134d059e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.
Transparency log