Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

kotha 0.2.0rc1 (release candidate)

Research use only. Not validated for individual treatment decisions.

kotha is a decision/reporting workflow for RCT-anchored, conditional borrowing of external aggregate evidence (HR, OR or RR on the log scale). It is not a novel Bayesian estimator: every borrowing computation (fixed-alpha and normalised power priors, robust MAP mixture) is established methodology, implemented here by a frozen, byte-identical copy of the R1 study engine (kotha/_engine/kotha_borrow.py, SHA-256 7b7d07f4bf6e29833ea869e82db5141258a8408682aa2f3ddd1e6059a8a2e7ef). What the workflow adds is structured recording of the target estimand and source provenance, a human design-credibility judgement (Stage C) recorded separately from the statistical conflict diagnostic, RCT-only results shown first, and machine-readable, hash-sealed job/result files.

Limitations (always shown)

  • Aggregate data cannot distinguish bias in external evidence from genuine effect modification.
  • Compatibility statistics are not evidence of exchangeability; there is no automatic causal transportability.
  • In the R1 simulations the KOTHA workflow showed no net decision advantage over robust MAP combined with the same observable screen.
  • The prespecified Stage C beneficial-borrowing threshold failed in R1 (0.4895 < 0.5).
  • The Stage C judgement is recorded as entered by the named assessor; the software does not verify it.

Install (from a built wheel)

python -m venv .venv
# Linux/macOS: source .venv/bin/activate     Windows PowerShell: .venv\Scripts\Activate.ps1
pip install kotha-0.2.0rc1-py3-none-any.whl

Dependencies: Python >= 3.10, NumPy >= 1.24, SciPy >= 1.10.

Command line

kotha validate JOB.json
kotha run JOB.json --output RESULT.json --report REPORT.html
kotha report RESULT.json --output REPORT.html
kotha verify RESULT.json --job JOB.json
kotha hash JOB.json
kotha template-csv --output estimates.csv

run refuses to write output when validation fails. verify (and report, and result import in the web app) reports three checks: (a) schema, version, IDs and SHA-256 hashes are consistent; (b) re-running the embedded job with this build's engine reproduces the result (numbers within 1e-10, all other fields identical, except the self-reported runtime/build metadata and timestamp); (c) with --job, the inputs equal that job. The command exits 0 only if (a) and (b) pass and (c), when given, matches. Without (c) the inputs, including the Stage C record, come from the file and may have been edited before recomputation. None of the checks shows who produced the file or that the analysis is causally valid or transportable. Missing or malformed files give a one-line error and exit code 2; add --verbose to see a traceback for internal errors.

Development: pip install -e .[test] (pytest, jsonschema). Building the web app: pip install -r ../webapp/requirements-build.txt, then python ../webapp/build.py --fetch-runtime (or --runtime-dir DIR with the eight Pyodide files downloaded yourself; every file must match the SHA-256 in the acquisition ledger, and TLS verification is never disabled). Windows notes: docs/INSTALL_WINDOWS.md. Privacy: docs/PRIVACY.md. Changes: CHANGELOG.md.

Python API

import kotha
job = kotha.load_job("JOB.json")
report = kotha.validate_job(job)          # errors / warnings / flags
result = kotha.run_analysis(job)           # raises ContractError if invalid
kotha.export_result(result, "RESULT.json")
kotha.export_report(result, "REPORT.html")

Browser bridge

The static web app (same engine, run in self-hosted Pyodide) downloads kotha_job.json; kotha run on that file produces a kotha_result.json that the web app can import and verify. See docs/LOCAL_RUNNER.md.

Licence and citation

Original KOTHA code: MIT licence (LICENSE). The licence does not cover third-party components; notices for the web build (Pyodide MPL-2.0, CPython, Emscripten runtime libraries, NumPy, SciPy, OpenBLAS) are in webapp/third_party/NOTICES.md. Citation metadata: CITATION.cff. kotha --version prints the version and the source commit recorded at build time.

Metadata

Release files for kotha 0.2.0rc1

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

Source distribution (sdist)

Source distribution for kotha 0.2.0rc1
File Size Uploaded Provenance Actions
kotha-0.2.0rc1.tar.gz 33.3 kB With provenance Details for kotha-0.2.0rc1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kotha 0.2.0rc1
File Interpreter ABI Platform Actions
kotha-0.2.0rc1-py3-none-any.whl Python 3 none any Details for kotha-0.2.0rc1-py3-none-any.whl

Total release size: 65.2 kB

Release files / kotha-0.2.0rc1.tar.gz

Download URL kotha-0.2.0rc1.tar.gz
Size 33.3 kB
Tags Source
SHA-256 checksum
How to use checksums
be2efa539576ff32fe7960f7b61283439476abd5d5048bc5d88e7a055dbb55d6
BLAKE2b-256 checksum
How to use checksums
55421777eb1eb59fdd36777f763d7e3960242aeae3b6bd6a8dc0088f0935bfd8
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 30, 2026.

Transparency log

Release files / kotha-0.2.0rc1-py3-none-any.whl

Download URL kotha-0.2.0rc1-py3-none-any.whl
Size 31.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce09d577d893518e3f0fed3149cc1e0834c772826b6caa3146f3fe3f21ec0cd8
BLAKE2b-256 checksum
How to use checksums
07c21c46dd250b060104d746ce356cdc8c5a80ab3cf6e168f01b8ff9454bd695
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 30, 2026.

Transparency log

Security for kotha 0.2.0rc1

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.

Select from 2 files

Attestation for kotha-0.2.0rc1.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 30, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release
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