This release is a pre-release and may not be stable for production use.
solidfunc
An experimental functional Python API for SolidCore.
This is a small academic exploration of typed, functional CAD as code, informed by CadQuery, build123d, and CAD as Code. Its scope is a limited set of examples for investigating API design and kernel behavior.
Hello world
import solidfunc as sf
block = sf.box(length=10, width=20, height=30)
moved = sf.translate(block, x=100)
print(sf.volume(block)) # 6000.0 mm³
print(sf.bounds(block)) # ((0.0, 0.0, 0.0), (10.0, 20.0, 30.0))
print(sf.bounds(moved)) # ((100.0, 0.0, 0.0), (110.0, 20.0, 30.0))
sf.export_step(block, "hello.step")
Geometry is opaque. Functions return new geometry and preserve their inputs.
Lengths are millimetres, volumes are cubic millimetres, and a box's origin
is its lower corner. Currently implemented: box, translate, volume,
bounds, and export_step. This initial example exercises SolidCore itself.
The example writes a STEP AP242 file that can be opened in other CAD tools. With CadQuery and OCP CAD Viewer installed, view it using:
import cadquery as cq
from ocp_vscode import show
show(cq.importers.importStep("hello.step"))
CadQuery and the viewer are optional tools for inspecting exported geometry.
Development
git clone https://github.com/DavidMStraub/solidfunc.git
cd solidfunc
uv sync --locked --config-setting build-args=--profile=dev
uv run --no-sync python examples/hello_world.py
uv run --no-sync pytest
uv run --no-sync ruff check .
uv run --no-sync ruff format --check .
uv run --no-sync mypy
cargo fmt --all --check
cargo clippy --locked --all-targets -- -D warnings
The project uses a mixed Python/Rust layout: the public typed API lives in
python/solidfunc, and the private PyO3 extension in src/lib.rs calls
solidcore-ops and solidcore-step. Maturin builds and installs the extension
during uv sync; the development command above uses the faster debug profile.
Python 3.11+ is supported using the CPython stable ABI (abi3).
SolidCore is pinned to commit cb9bee4bb9f56880c9973a9f8e99c83fdec24ad3
in Cargo.toml; Cargo.lock and uv.lock pin the resolved dependencies.
Updating the kernel is an explicit change to that revision followed by a
lockfile update and the geometry checks.
To check STEP exchange against CadQuery's independent kernel:
uv run --no-sync --with 'cadquery>=2.8,<3' pytest tests/test_step_export.py
The CadQuery round-trip tests are skipped when that optional dependency is absent.
Builds and publishing
uv build
uv run twine check dist/*
CI checks Python formatting, lint, typing, and geometry behavior, plus Rust formatting and clippy. The reusable wheel workflow builds and tests native wheels for Linux, Windows, and macOS, and builds a source distribution. The Build distributions workflow can also be run manually.
Publishing is a separate Publish to PyPI workflow triggered by a published GitHub release. It checks that the tag matches the package version, builds and tests the distributions, and publishes with OIDC trusted publishing.
Before the first release, register a pending trusted publisher on PyPI:
| Setting | Value |
|---|---|
| PyPI project | solidfunc |
| GitHub owner | DavidMStraub |
| Repository | solidfunc |
| Workflow filename | publish.yml |
| Environment | pypi |
The initial Cargo version 0.1.0-alpha.1 maps to Python version 0.1.0a1.
Publish a GitHub release tagged v0.1.0a1 to release it. No PyPI API token is
needed. Creating the repository or pushing a commit does not publish a package.
License
solidfunc is MIT licensed. SolidCore and its SMLib-derived code are Apache-2.0 licensed; the distribution includes the corresponding upstream notices.
Metadata
Release files for solidfunc 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| solidfunc-0.1.0a1.tar.gz | 69.6 kB | Without provenance | Details for solidfunc-0.1.0a1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| solidfunc-0.1.0a1-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details for solidfunc-0.1.0a1-cp311-abi3-win_amd64.whl |
| solidfunc-0.1.0a1-cp311-abi3-manylinux_2_28_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ x86-64 | Details for solidfunc-0.1.0a1-cp311-abi3-manylinux_2_28_x86_64.whl |
| solidfunc-0.1.0a1-cp311-abi3-manylinux_2_28_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ ARM64 | Details for solidfunc-0.1.0a1-cp311-abi3-manylinux_2_28_aarch64.whl |
| solidfunc-0.1.0a1-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details for solidfunc-0.1.0a1-cp311-abi3-macosx_11_0_arm64.whl |
| solidfunc-0.1.0a1-cp311-abi3-macosx_10_12_x86_64.whl | CPython 3.11 | abi3 | macOS 10.12+ x86-64 | Details for solidfunc-0.1.0a1-cp311-abi3-macosx_10_12_x86_64.whl |
Total release size: 38.3 MB
Release files / solidfunc-0.1.0a1.tar.gz
| Download URL | solidfunc-0.1.0a1.tar.gz |
|---|---|
| Size | 69.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5f6956a044ee1c9489dc35b61c8bbdb66d481b07cc6d573edc207e8007e93a0
|
|
BLAKE2b-256 checksum How to use checksums |
3a160c442ebb742b6014d099fb30dad5120a21fffeaec6bae4e79c8855dc28f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / solidfunc-0.1.0a1-cp311-abi3-win_amd64.whl
| Download URL | solidfunc-0.1.0a1-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 7.5 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
dcdfde45bac0a4af1ac77061869b3ffd0bd0fb45736c2b10f2d5bc036ade14d5
|
|
BLAKE2b-256 checksum How to use checksums |
8e9d7b23ec86dca06f0efae8f04a7140d880f2c6c03a3b151a6b2612fa08be54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / solidfunc-0.1.0a1-cp311-abi3-manylinux_2_28_x86_64.whl
| Download URL | solidfunc-0.1.0a1-cp311-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.5 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ad357b1402e718a667254ddb18e5968482b003bbe512527f2f3caa56c0054d8d
|
|
BLAKE2b-256 checksum How to use checksums |
a9f16f29ecc9bba29f28127e7f7b0da6aa00693c3839d3f83e426fd8776397da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / solidfunc-0.1.0a1-cp311-abi3-manylinux_2_28_aarch64.whl
| Download URL | solidfunc-0.1.0a1-cp311-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 7.4 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
b536cd979be04d57a19fd08c3f438cbf57ebf09bf0f11205315ab2122a99b804
|
|
BLAKE2b-256 checksum How to use checksums |
bbb10e50fefde050afb79612513b065c73b53f81957af66bee69c98c627c5f37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / solidfunc-0.1.0a1-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | solidfunc-0.1.0a1-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 7.1 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
46ed6db85425afc833eb7d82f362c0e24c8346cfddf15c3d52332125aad67a59
|
|
BLAKE2b-256 checksum How to use checksums |
83d27c46aeda9d3b0fb67240c4969866f832c16c477a31053949fa231bd40ae7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / solidfunc-0.1.0a1-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | solidfunc-0.1.0a1-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 7.9 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
28434ce63d3b7e9cd4a60955208fd9bebaa02207b5518a1605c5c54a5b5c9ea0
|
|
BLAKE2b-256 checksum How to use checksums |
7b550239430d35f7f3a611e915ea8d74742a5713912afcb5675b2ae1a6ebe19b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for solidfunc 0.1.0a1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.