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

Built distributions (wheels)

Table of built distributions (wheels) for cadbuildr-ironstream 0.4.0
File Actions
cadbuildr_ironstream-0.4.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for cadbuildr_ironstream-0.4.0-cp39-abi3-win_amd64.whl
cadbuildr_ironstream-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for cadbuildr_ironstream-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl
cadbuildr_ironstream-0.4.0-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.4.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
cadbuildr_ironstream-0.4.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for cadbuildr_ironstream-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
cadbuildr_ironstream-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for cadbuildr_ironstream-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 7.6 MB

Release files / cadbuildr_ironstream-0.4.0.tar.gz

Download URL cadbuildr_ironstream-0.4.0.tar.gz
Size 4.9 MB
Tags Source
SHA-256 checksum
How to use checksums
119a739e2e1b8d8ec8dc857948a051975242d52721cd912d826ba39023628b9e
BLAKE2b-256 checksum
How to use checksums
15b878cbde236fb7c8617689e5e35a6d81d25dc89fb6d25f343c07eab6a299c7
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 25, 2026.

Transparency log

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

Download URL cadbuildr_ironstream-0.4.0-cp39-abi3-win_amd64.whl
Size 400.2 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
bb6d84891c32323d666334abd91d8e7f54a82da20549fa438573beb33a4e5604
BLAKE2b-256 checksum
How to use checksums
16b979177c6431fb2c25c79d4e3b1c83b36df23b06133a5df0693fc239ef6f21
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 25, 2026.

Transparency log

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

Download URL cadbuildr_ironstream-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl
Size 578.3 kB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
a081eef274c2be331303e2a0b3fab34734c33badaeacca59e6100644c015e12a
BLAKE2b-256 checksum
How to use checksums
bf1b4ed59ba5f2bef8b1eb6c1e409389f7abff7a47fec38e6d482ae98e59b8b9
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 25, 2026.

Transparency log

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

Download URL cadbuildr_ironstream-0.4.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 669.5 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
50f942a9db205224ea69a1b6500d5770c3f57c5076ec1588cd355c2f7ff522d8
BLAKE2b-256 checksum
How to use checksums
d0a7fd88fd13d736c587aad1c67b63058d409a8d973312b35ec5ca03a6addfad
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 25, 2026.

Transparency log

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

Download URL cadbuildr_ironstream-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
Size 508.1 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
dd1ff6bd863a73f7ab0f66fc957894a74aea2098603bc51f7c983c11591ad0e1
BLAKE2b-256 checksum
How to use checksums
de5e5aea73ebdd469d7dacb677e1ac3a7b0f3c58d4e6ef1fdf37360c423ea69f
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 25, 2026.

Transparency log

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

Download URL cadbuildr_ironstream-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 520.1 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
793e954df8664514ec2132c3fa5a4818cc16172d2bb14a461318bd2e47516a45
BLAKE2b-256 checksum
How to use checksums
fca6e516da6591b768305f6609b7b4b0008b141df0f631a4b77a45fc25227822
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 25, 2026.

Transparency log

Security for cadbuildr-ironstream 0.4.0

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.4.0.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 25, 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