Skip to main content

ironstream (Python bindings)

PyO3 bindings for the IronStream CAD geometry kernel — a from-scratch, zero-dependency Rust port of OpenCascade.

This is one of three consumption paths off the IronStream kernel (the other two — native Rust and a WASM/TypeScript export — live elsewhere). It mirrors the kernel's OCCT-shaped prelude, in the spirit of pyOCCT: symbols are available both flat and under OCCT-style submodules.

import ironstream as ist

box = ist.make_box(ist.Pnt(0, 0, 0), 20, 20, 20)
hole = ist.make_cylinder(5, 20)
part = ist.cut(box, hole)
print(part.volume())

with open("part.stl", "wb") as f:
    f.write(ist.write_binary_stl(part.mesh()))

pyOCCT-style namespaces are also available:

from ironstream.gp import Pnt
from ironstream.prim import make_box
from ironstream.algo import cut

Layout

Namespace Contents
ironstream.gp Pnt (Vec3, Point3), Ax1, Trsf
ironstream.topods Vertex, Wire, Face, Solid, Compound
ironstream.mesh TriMesh, BBox
ironstream.prim make_box/cylinder/cone/sphere/torus/prism/revol, MeshParams
ironstream.builder make_polygon, make_face, make_face_with_holes, transform
ironstream.algo fuse, cut, common, fuse_all
ironstream.io write_binary_stl, write_ascii_stl, write_step

Development

Requires a Rust toolchain and maturin. The kernel is pulled in as a local path dependency (../ironstream), so clone both repos as siblings.

uv venv
maturin develop            # builds the kernel + binding, installs into the venv
python -c "import ironstream; print(ironstream.make_box(ironstream.Pnt(0,0,0),1,1,1).volume())"

Build a distributable wheel with maturin build --release.

Releasing

Install from PyPI with pip install cadbuildr-ironstream (imported as import ironstream). To release: bump version in both pyproject.toml and Cargo.toml (and KERNEL_REF in .github/workflows/publish-pypi.yml to the kernel commit you built against), then push a vX.Y.Z tag. The workflow builds Linux (x86_64, aarch64), macOS (arm64, x86_64) and Windows wheels plus an sdist and publishes them via PyPI Trusted Publishing.

Pyodide / WebAssembly

The binding also builds as a Pyodide wheel (~140 KB) that runs the whole kernel in the browser — this powers the live demo on the IronStream project page:

chmod +x scripts/build_pyodide_wheel.sh
./scripts/build_pyodide_wheel.sh    # -> dist/cadbuildr_ironstream-*-emscripten_*_wasm32.whl

The script pins the full toolchain (pyodide xbuildenv 0.29.4, emscripten 4.0.9, rust nightly-2025-02-01 + pyodide's wasm-eh sysroot) and documents why each pin exists. Load it in a page with:

const { loadPyodide } = await import("https://cdn.jsdelivr.net/pyodide/v0.29.4/full/pyodide.mjs");
const py = await loadPyodide({ indexURL: "https://cdn.jsdelivr.net/pyodide/v0.29.4/full/" });
await py.loadPackage("<url of the .whl>");
py.runPython(`import ironstream as ist; print(ist.make_sphere(10).volume())`);

Metadata

Release files for cadbuildr-ironstream 0.3.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 cadbuildr-ironstream 0.3.1
File Size Uploaded Provenance Actions
cadbuildr_ironstream-0.3.1.tar.gz 4.9 MB With provenance Details for cadbuildr_ironstream-0.3.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for cadbuildr-ironstream 0.3.1
File Actions
cadbuildr_ironstream-0.3.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for cadbuildr_ironstream-0.3.1-cp39-abi3-win_amd64.whl
cadbuildr_ironstream-0.3.1-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for cadbuildr_ironstream-0.3.1-cp39-abi3-manylinux_2_28_aarch64.whl
cadbuildr_ironstream-0.3.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for cadbuildr_ironstream-0.3.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
cadbuildr_ironstream-0.3.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for cadbuildr_ironstream-0.3.1-cp39-abi3-macosx_11_0_arm64.whl
cadbuildr_ironstream-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for cadbuildr_ironstream-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 7.5 MB

Release files / cadbuildr_ironstream-0.3.1.tar.gz

Download URL cadbuildr_ironstream-0.3.1.tar.gz
Size 4.9 MB
Tags Source
SHA-256 checksum
How to use checksums
edfa9314a4938cd37d8f664450297da15cf25da54f5087b9bf180a6e7f9f282b
BLAKE2b-256 checksum
How to use checksums
f1020448996ea13be820759a8fc78800c4e7bfa9cdd34589d46049b318f6d561
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 24, 2026.

Transparency log

Release files / cadbuildr_ironstream-0.3.1-cp39-abi3-win_amd64.whl

Download URL cadbuildr_ironstream-0.3.1-cp39-abi3-win_amd64.whl
Size 380.8 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
8f36c38e771584ffafd699fecada5a32f63da5c8346dba4286e88b2465bc484e
BLAKE2b-256 checksum
How to use checksums
a80c258b5fa1e15c31a8a5ac981de571c138d3483c75ddd4e9b13fc2121e324c
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 24, 2026.

Transparency log

Release files / cadbuildr_ironstream-0.3.1-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL cadbuildr_ironstream-0.3.1-cp39-abi3-manylinux_2_28_aarch64.whl
Size 560.5 kB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
c87b66fed8f5bc29d757dbb7ef4be4d32bf057b864785e4087424e3d794905f6
BLAKE2b-256 checksum
How to use checksums
b5df01c58bf5ff21d3d2dd1771fad88d93dd65e1652d99cc9d37c76c3d096c70
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 24, 2026.

Transparency log

Release files / cadbuildr_ironstream-0.3.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL cadbuildr_ironstream-0.3.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 649.6 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
c17c6e988dda78aa60a3e51a1cb6aea913c49389675c41f6d123608813594fae
BLAKE2b-256 checksum
How to use checksums
49465705a29b752bd865ac4626fde09a9b0bce274bfcd02b2de4c20929395203
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 24, 2026.

Transparency log

Release files / cadbuildr_ironstream-0.3.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL cadbuildr_ironstream-0.3.1-cp39-abi3-macosx_11_0_arm64.whl
Size 489.1 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0786b09ac46d4b8fc0319a02cec0f225aa8f4a82d33380e9735cb9856d6d2241
BLAKE2b-256 checksum
How to use checksums
592b562e23befcf915ca644035cd7a2acb1d5e1f9633c698f0b40f4ee489d8d3
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 24, 2026.

Transparency log

Release files / cadbuildr_ironstream-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL cadbuildr_ironstream-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 499.3 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
383b132160157bec4d32775893f694fa9c88c2482e8a0504b999e8bbd3265639
BLAKE2b-256 checksum
How to use checksums
b08dbf189e7de71237e71358ea305f96ed4bb29b20c0f3d08eea45c0be8fb3a3
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 24, 2026.

Transparency log

Security for cadbuildr-ironstream 0.3.1

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

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for cadbuildr_ironstream-0.3.1.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 24, 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.

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