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 biological-model sensitivity sweeps (sweep_biological_model, SensitivitySweep). 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.1.1

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.1.1
File Size Uploaded
openbnct-0.1.1.tar.gz 356.8 kB Details

Built distributions (wheels)

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

Total release size: 18.7 MB

Release files / openbnct-0.1.1.tar.gz

Download URL openbnct-0.1.1.tar.gz
Size 356.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fa487f5d13c56f117dac99d3041062d5ad6944185d8a524c05bebde18b75739c
BLAKE2b-256 checksum
How to use checksums
34ff936173e0336faf37475160fe84a711bdfaf2a2e3db1af549564db14b41e7
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 16, 2026.

Transparency log

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

Download URL openbnct-0.1.1-cp310-abi3-win_amd64.whl
Size 3.8 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
5fb024fde07c2f72736738f75b13871f00553fa3480b5c149a9203a636123283
BLAKE2b-256 checksum
How to use checksums
e3b36fccfa6e9c1f3ec4ed9c6ba35851e6ee3093ee154ea6411af34f42328f45
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 16, 2026.

Transparency log

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

Download URL openbnct-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.7 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
a2a4913ffb453badff30699e6eea90108796329c464c01acd750c8380a66022a
BLAKE2b-256 checksum
How to use checksums
b73ef0efc9ca5e8bc8cc76fe21120ebd6d08db32eb8582c1e1f665b196eac3c2
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 16, 2026.

Transparency log

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

Download URL openbnct-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.5 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
1a063221daacb394f6084fa021a01825f77eeea07762fb21137fbe85d217d6cb
BLAKE2b-256 checksum
How to use checksums
e1594f8be3d7453ab57f0bd04bae85ef3369e1bb5a60f9c6f2e05270a96b2b6a
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 16, 2026.

Transparency log

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

Download URL openbnct-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
Size 3.6 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0c310239e6e3d6aec8f02d787b70488cfaf2cd2d08939d4ba2a7667c4f4d42ab
BLAKE2b-256 checksum
How to use checksums
089c7bf23de56d60220400b3fafb6c7709d6b615394ebcf63ed8ff17832a3e51
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 16, 2026.

Transparency log

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

Download URL openbnct-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl
Size 3.8 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
9b15e7fa8237fd3a4987ae1211fae7aae3de9474ff1b19e3ab167fbf822ddd24
BLAKE2b-256 checksum
How to use checksums
17e9bb53ce049dd3dd9b36ffe768f6b806c797136929b2d02629bcaff9a75f6a
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 16, 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

0.2.0

6 release files

This release

0.1.1 This release

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