This release is a pre-release and may not be stable for production use.
KKRunner
Program-independent Python execution, durable run history, file manifests,
local/MPI processes, SSH transport and optional PSI/J scheduler support.
The core depends on platformdirs and psutil; scheduler support is an optional extra.
python -m pip install .
python -m pip install '.[psij]' # optional scheduler support
kkrunner --help
Run these commands from the KKRunner checkout in a virtual environment.
Use python -m pip install --editable . instead when editing the source.
Raw execution
import sys
from kkrunner import ExecutionSpec
from kkrunner.backends import LocalExecutor
run = LocalExecutor().create_run(ExecutionSpec([sys.executable, '-c', 'print(42)']))
outcome = run.run()
assert outcome.return_code == 0
Persistent execution
A RunManager records runs in a RunStore so a later client can reconnect.
Projects are optional; see the project guide for grouping.
import sys
from pathlib import Path
from kkrunner import ExecutionSpec, RunManager, RunStore
from kkrunner.backends import LocalExecutor
root = Path('example').absolute()
root.mkdir(exist_ok=True)
manager = RunManager(RunStore(root / 'runs'))
run = manager.create_run(
LocalExecutor(),
ExecutionSpec([sys.executable, '-c', 'print(42)'],
directory=root, output_file='stdout.txt'),
metadata={'example': {'label': 'answer'}},
)
outcome = run.run()
assert manager.store.get(run.id).state.value == 'finished'
manager.attach(run_id) resumes monitoring and required transfers. A result
callback is optional; when supplied it receives an ExecutionOutcome and may
return any Python object. To defer processing, create a run with
processing_required=True, then supply process_result= on a later attach.
Without that callback the durable state remains postprocessing and wait()
raises ProcessingPending. The same exception tells an application observer
that another client owns/already performed processing; load the historical
application result instead of treating a raw outcome as a parsed result.
manager.retry_postprocessing(run_id, callback) retries failed/interrupted
processing against the captured files without submitting another process.
manager.resume_download(run_id) reopens a failed download before attach.
run.stop_observation() detaches observation without cancelling the backend;
run.cancel() requests backend cancellation. Untracked raw local runs have no
restart/reconnect guarantee; managed local runs use the same supervisor as SSH.
See the documentation guide and architecture for usage, ownership, recovery and format rules.
Development and distribution
For development, install an editable checkout with test dependencies:
python -m pip install --editable '.[test]'
python -m pytest -q
To produce archives for sharing, install the build tool with
python -m pip install build, then run python -m build. This creates a source
archive and an installable wheel in dist/. CI validates these artifacts on
Linux with Python 3.9, 3.12 and 3.14, plus macOS tests on Apple Silicon and
Intel with Python 3.12, including durable local supervision and reconnect.
See development for test scope and packaging details.
Publish to PyPI
The publish-pypi.yml workflow runs on a v<version> tag from any branch.
The tag must exactly match [project].version in pyproject.toml; publication
is independent of branch names.
The version is defined in pyproject.toml; kkrunner.__version__ reads the
installed distribution metadata automatically.
Configure a PyPI Trusted Publisher for project kkrunner, GitHub owner
ase2sprkkr, repository kkrunner, workflow publish-pypi.yml and environment
pypi. Protect the GitHub pypi environment with required reviewers and v*
tag rules. If hosted under another owner, use that owner in
the publisher configuration. No PyPI API token is needed.
The workflow verifies the tag, builds one source archive and wheel,
then tests that wheel on Python 3.9, 3.12 and 3.14 and builds/tests the documentation.
Only after all checks pass does the publish job upload those exact artifacts
using the pypi environment and GitHub's OIDC token.
For nonpublic evaluation, use a prerelease version and do not push a version tag. Branch CI retains wheel/sdist artifacts for evaluation. Use access-controlled storage when sharing with testers: GitHub artifacts in a public repository are not private, and an upload to PyPI is public even for a development version.
Documentation
Documentation is published at https://ase2sprkkr.github.io/kkrunner/ after
successful runtime and documentation checks on master.
The user guide and API reference use Sphinx with the Read the Docs theme. Install the documentation extra and build the HTML and examples:
python -m venv .venv
.venv/bin/python -m pip install -e '.[docs]'
make docs PYTHON=.venv/bin/python
make docs-test PYTHON=.venv/bin/python
Use the same Python for dependency installation and Makefile targets; the
docs extra includes MyST and the theme. Open build/docs/html/index.html. See the guide for raw and
persistent execution, manifests, projects, schedulers, remote execution and the
CLI; development covers builds and releases. Generated
API pages and HTML are not committed. CI validates documentation against the
installed wheel and uploads the HTML artifact. The separate documentation
workflow checks the same wheel and documentation, omits the runtime test
matrices, and deploys to GitHub Pages when a release is published or on manual runs. Enable
Settings → Pages → Build and deployment → GitHub Actions and allow release
tags and manually selected source branches in the github-pages environment
deployment rules.
Source provenance is recorded in development remarks; the license is in LICENCE.
Metadata
Release files for kkrunner 0.1.0b2
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 |
|---|---|---|---|---|
| kkrunner-0.1.0b2.tar.gz | 231.5 kB | With provenance | Details for kkrunner-0.1.0b2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kkrunner-0.1.0b2-py3-none-any.whl | Python 3 | none | any | Details for kkrunner-0.1.0b2-py3-none-any.whl |
Total release size: 350.2 kB
Release files / kkrunner-0.1.0b2.tar.gz
| Download URL | kkrunner-0.1.0b2.tar.gz |
|---|---|
| Size | 231.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1cbdba03add8152ce2456d31d51467a32e861865a2c9409054602e9cfd94c43
|
|
BLAKE2b-256 checksum How to use checksums |
989aa83e9aec6a7593d39cc7956c6ddd10d112da4bb66b145003afad26886b35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 9, 2026.
Transparency logRelease files / kkrunner-0.1.0b2-py3-none-any.whl
| Download URL | kkrunner-0.1.0b2-py3-none-any.whl |
|---|---|
| Size | 118.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68af0112f74a995fbac44ba129a192801edb01d1b4c4ad8a82e6c7d8fabfb1bf
|
|
BLAKE2b-256 checksum How to use checksums |
56b6cb3dc178953782399b89b951dc9450d62f0057e06bf9a1b366d01745eac5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 9, 2026.
Transparency logSecurity for kkrunner 0.1.0b2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for kkrunner-0.1.0b2.tar.gz
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 Nov 9, 2026.
Transparency logA 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.