Skip to main content

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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for papermill-tenki 0.2.0
File Size Uploaded
papermill_tenki-0.2.0.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for papermill-tenki 0.2.0
File Interpreter ABI Platform
papermill_tenki-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.8 kB

Release files / papermill_tenki-0.2.0.tar.gz

Download URL papermill_tenki-0.2.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e2a3178cfeaa0deb9c7ca873be7ed55c47027c670470a6196fc02b1472de93f3
BLAKE2b-256 checksum
How to use checksums
adc5c76212b20f02ea68c7d8ab22bc492e92c373679e15ff65811506f0624f05
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

Release files / papermill_tenki-0.2.0-py3-none-any.whl

Download URL papermill_tenki-0.2.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b73c5cc3e13f46995fbf8cbac2e370270154c23652f5ccd35b2fa039edbe354
BLAKE2b-256 checksum
How to use checksums
412b0ac4039b6d5f7d1a84cdd1efcbd7f9d64179ddd354f50d565deab87c1105
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

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page