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
export TENKI_PROJECT_ID=...          # project to create sandboxes in

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:
    # project_id="...", 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
project_id TENKI_PROJECT_ID — (required) Tenki project the sandbox is created in
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

TENKI_API_KEY is read by the Tenki SDK itself.

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=... TENKI_PROJECT_ID=... pytest tests/test_live_smoke.py   # live smoke test

Metadata

Release files for papermill-tenki 0.1.2

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.1.2
File Size Uploaded
papermill_tenki-0.1.2.tar.gz 9.2 kB Details

Built distribution (wheel)

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

Total release size: 16.7 kB

Release files / papermill_tenki-0.1.2.tar.gz

Download URL papermill_tenki-0.1.2.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a7336fc78cc737c7700861625bc2721a68251243e9465458623a3da5bfb66c6e
BLAKE2b-256 checksum
How to use checksums
2d2c68d503353eeac6533c96ba301adde81f83d41f1e73dea142db61f5a9a081
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 22, 2026.

Transparency log

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

Download URL papermill_tenki-0.1.2-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90aee2000e50ebf47932e6491d81c2abfc95c3772662973d966ce58b04dade97
BLAKE2b-256 checksum
How to use checksums
8fe7eaf11f96666eba2e14db862afc59ca346257346099cc8ebb1239a6215957
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

This release

0.1.2 This release

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