Skip to main content

solidcraft (Python)

Drive SolidCraft from Python. Every engine command and every MCP tool is a typed method, generated from the build, and NumPy, SciPy or pandas values can be passed straight in.

import numpy as np
import solidcraft as sc

with sc.session() as d:
    d.cmd.solid.box(length=60, width=40, height=8, body_name="Plate")
    a = np.linspace(0, 2 * np.pi, 6, endpoint=False)
    for p in np.column_stack([30 + 15 * np.cos(a), 20 + 15 * np.sin(a), np.full(6, 8.0)]):
        d.cmd.solid.hole(position=p, diameter=4)
    print(d.changes())

sc.session() uses a running session daemon (solidcraft-session serve) when there is one, so several scripts work on one design, and otherwise starts its own headless SolidCraft. It talks to solidcraft-cli mcp --structured, the same MCP server agents use (SOLIDCRAFT_CLI names the binary when it is not on PATH). Design notes: docs/python-api.md.

pip install solidcraft
uvx solidcraft mcp     # the MCP server over stdio: command "uvx", args ["solidcraft", "mcp"]

The solidcraft command runs solidcraft-cli with the same arguments and exit code (uvx solidcraft --version).

The generated bindings come from cargo xtask python and are not committed.

Metadata

Release files for solidcraft 0.51.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for solidcraft 0.51.1
File Interpreter ABI Platform Actions
solidcraft-0.51.1-py3-none-any.whl Python 3 none any Details for solidcraft-0.51.1-py3-none-any.whl

Release files / solidcraft-0.51.1-py3-none-any.whl

Download URL solidcraft-0.51.1-py3-none-any.whl
Size 475.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef92f8b4b5e545681e96ddd462d5973d6099be3b075629c2cc502e3412010059
BLAKE2b-256 checksum
How to use checksums
76460077574ebf6182c7ad8f87d0e2c3e7042c924dd033aed9af439cb836a7bf
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 27, 2026.

Transparency log

Security for solidcraft 0.51.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

1 file in this release has been uploaded with provenance metadata.

Attestation for solidcraft-0.51.1-py3-none-any.whl

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 27, 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