Skip to main content

Python bindings

pip install openbnct is the planned primary entry point for scientific users. The package uses PyO3 and maturin to wrap the authoritative Rust crates; it does not implement a second dose, geometry, evidence, or QA engine (ADR 0015).

The mixed-package shape is:

bindings/python/
  Cargo.toml                 PyO3 extension crate (outside the workspace)
  pyproject.toml             maturin build and package metadata
  src/lib.rs                 narrow Rust-to-Python boundary
  python/openbnct/
    __init__.py              ergonomic public API
    _openbnct.pyi            checked extension types
    py.typed                 typing marker
  tests/                     cross-language parity suite

The API covers case generation, verification, and gated loading for NF-BNCT-001; geometry, ROI, and CT inspection; case.json manifest reading and artifact re-verification; validated material, source, component profile, response-generation method, and response-set contract readers with canonical to_json serialization; the response-set folding_ready review gate; statepoint collection; DVH and dose-volume metrics; biological-model application and TCP/NTCP/UTCP endpoint evaluation; exposure-plan table import/export and weighted accumulation; and external component-dose import (import_component_dose, import_mcnp_meshtal, import_phits) plus MCNP deck export (export_mcnp_deck); and external-dose/BED combined analysis (import_external_dose, bed_from_external_dose, combine_biological_doses); source positioning (aim_source, rotate_source, PositionReport); and cross-code dose comparison (compare_dose_bundles, DoseComparison); and gamma-index evaluation (evaluate_gamma, GammaEvaluation); and biological-model sensitivity sweeps (sweep_biological_model, SensitivitySweep); and validated readers for the deterministic-transport and evidence artifact family — multigroup data/flux/covariance, dose-uncertainty budgets, sensitivity specs and screening reports, resolved weight windows, measurement records and comparison reports, beam descriptions and beam-quality reports, accelerator sources, beam-shaping assemblies and sweeps, lineal-energy spectra and tally specs, metamorphic and analytic oracle evaluations, boron microdistribution models and corrections, RTPLAN summaries (load_rtplan_summary, summarize_rtplan), and component-NIfTI export manifests. Every load runs the same Rust validate() as the CLI, every rejection raises NctForgeError, and adapter provenance binds the generated interchange document's SHA-256 exactly as the CLI does. Transport actions stay unavailable until the Rust capability and evidence gates pass; backends() reports those flags honestly.

Local development:

python3 -m venv .venv
.venv/bin/pip install 'maturin>=1.7,<2'
.venv/bin/maturin develop
.venv/bin/python -m unittest discover -s tests -p 'test_*.py'

maturin develop builds the extension in place; maturin build produces a wheel under target/wheels. The extension targets the CPython stable ABI (abi3-py310), so one wheel per platform covers every supported interpreter (cp310-abi3-*). CI builds the wheel, installs it into a clean virtual environment, and runs the parity suite there; the same build + clean-venv parity run has been verified locally on CPython 3.14. Publication of the platform matrix through TestPyPI remains a pending release gate — see ADR 0015 and ADR 0027.

Metadata

Release files for openbnct 0.2.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 openbnct 0.2.2
File Size Uploaded
openbnct-0.2.2.tar.gz 728.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for openbnct 0.2.2
File
openbnct-0.2.2-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
openbnct-0.2.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
openbnct-0.2.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
openbnct-0.2.2-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
openbnct-0.2.2-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 24.9 MB

Release files / openbnct-0.2.2.tar.gz

Download URL openbnct-0.2.2.tar.gz
Size 728.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d7d5a12ce84df878e435985cb7382aebd93ef71f2ec6e22f6375db8f0df997be
BLAKE2b-256 checksum
How to use checksums
9d40d370db78ada258eefe3a81ce716b45f8ec7a8f03d219b225969795031fab
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 Sep 23, 2026.

Transparency log

Release files / openbnct-0.2.2-cp310-abi3-win_amd64.whl

Download URL openbnct-0.2.2-cp310-abi3-win_amd64.whl
Size 4.9 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
88ca46eee10681e06e5c127864944fe5b4428b4bd8a8db3f6274d06af17cd835
BLAKE2b-256 checksum
How to use checksums
91fd9381901f6186e60ef6fa0c32817f10a6cc0e4ead4b9ae852551f27af9c7e
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 Sep 23, 2026.

Transparency log

Release files / openbnct-0.2.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL openbnct-0.2.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.9 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
beb291242de3bbbdd6f98baba038f50cfccd336c30f9468c79c2f205a6b23ac4
BLAKE2b-256 checksum
How to use checksums
94ac6252bc8f0dced1ddf194d9f0cafa7352c856a38cbd4d678963296e798b10
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 Sep 23, 2026.

Transparency log

Release files / openbnct-0.2.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL openbnct-0.2.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.7 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
821742ab246856dc78feb5b1204dc1c45320800bff77c3fb03f89d127fbe2601
BLAKE2b-256 checksum
How to use checksums
a25cfdfcfd0acb8efaf118b1295a7a151db89d2d19050d09127bfda1d7890521
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 Sep 23, 2026.

Transparency log

Release files / openbnct-0.2.2-cp310-abi3-macosx_11_0_arm64.whl

Download URL openbnct-0.2.2-cp310-abi3-macosx_11_0_arm64.whl
Size 4.7 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
67dbc069361596ae902d3e5f90ec6af662cbffa9d6ad3c689c21e840549cc4ab
BLAKE2b-256 checksum
How to use checksums
705170270c29fd081f0ae4ec29584a31e7a8db8f334060ec50502f5bf68f1ee3
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 Sep 23, 2026.

Transparency log

Release files / openbnct-0.2.2-cp310-abi3-macosx_10_12_x86_64.whl

Download URL openbnct-0.2.2-cp310-abi3-macosx_10_12_x86_64.whl
Size 4.9 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
92aefc0f17d0c6d41834d9c6969a168b916c092cca1e0af9cdf2ce8c8c9b3b20
BLAKE2b-256 checksum
How to use checksums
e8365cf8d6abf142f959235305f84d86a4782b92e84c055f25b97344991f365a
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 Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

6 release files

0.3.0

6 release files

This release

0.2.2 This release

6 release files

0.2.0

6 release files

0.1.1

6 release files

0.1.0

6 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