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.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 openbnct 0.2.0
File Size Uploaded
openbnct-0.2.0.tar.gz 604.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for openbnct 0.2.0
File
openbnct-0.2.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
openbnct-0.2.0-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.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
openbnct-0.2.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
openbnct-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 22.2 MB

Release files / openbnct-0.2.0.tar.gz

Download URL openbnct-0.2.0.tar.gz
Size 604.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8a91cc91163a99ecabc4d85b123218f718af9415d2dc3502fd8b08ccc1b31aea
BLAKE2b-256 checksum
How to use checksums
3b64d32b002974269db4954ed8a59e860f3647d163780ea5b0a1b83016d57880
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 22, 2026.

Transparency log

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

Download URL openbnct-0.2.0-cp310-abi3-win_amd64.whl
Size 4.4 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1e783e8ef2799110d8df15006139fbcab38039381206f4dc27089ef9cfbfe6c9
BLAKE2b-256 checksum
How to use checksums
ca8fe6abfe948897cc6e13649c7e1e7e5c43f43bcba432af07b64bc5f6eacd32
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 22, 2026.

Transparency log

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

Download URL openbnct-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.4 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
9378adfada0ac2e45f509ad1d7dcdfde06d6c2ef0d9378bf38ceea81f6700afb
BLAKE2b-256 checksum
How to use checksums
79ec55d91eed6e5fd8ce0dac0b061652560ee9661a1d72b90bd5277ed5680120
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 22, 2026.

Transparency log

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

Download URL openbnct-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.2 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
bd67fcdfd47963ad5423e6b55d197440207b10ba88a015f74db8f8b793aa9f2c
BLAKE2b-256 checksum
How to use checksums
701b246a8be2bf7c6466d0f4849540bced5463865fcad8e5c78ec7ef1a1884a6
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 22, 2026.

Transparency log

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

Download URL openbnct-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Size 4.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
038e614e2acd888a0443f3459a631c66cb4405d79322926180f3819288793b10
BLAKE2b-256 checksum
How to use checksums
8f754d8fa9ee5266750b6f04298e45146c064f394df23210390204b0aa980b7b
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 22, 2026.

Transparency log

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

Download URL openbnct-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 4.4 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d41075bf2746e1e28261e3d1aaefca6d300b7f7374a06f013cc5dd2a10c4753b
BLAKE2b-256 checksum
How to use checksums
7bf063ba73af08cf4db92085f65420eb746ad94e47b5c69b014758b274cb35a2
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 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

6 release files

0.3.0

6 release files

0.2.2

6 release files

This release

0.2.0 This release

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