Skip to main content

FastBuild123

Turn any build123d model into a live, interactive parametric web UI. Annotate your part function's parameters with a FastAPI-style @app.part() decorator and get auto-generated sliders in the browser with instant 3D preview — the type-annotated signature is the UI definition.

Quick start

Run a bundled example without installing anything:

uvx fastbuild123 demo enclosure

Or install it into your own project:

uv add fastbuild123      # or: pip install fastbuild123
fastbuild view my_model.py

A browser page opens with parameter controls on the left and a live 3D view on the right. Drag a slider or save the file — the model updates in place, keeping your camera pose, tree state, and clipping planes. A model that raises keeps the last-good geometry on screen with an error banner; fix the file and it recovers.

Defining parts

from typing import Annotated, Literal
from build123d import Part, Box
from fastbuild import App, Desc, Group, Range

app = App()

@app.part()
def enclosure(
    width:  Annotated[float, Range(20, 200, step=1, unit="mm")] = 80,
    wall:   Annotated[float, Range(0.8, 5, step=0.1, unit="mm"), Desc("Shell thickness")] = 2,
    ribs:   Annotated[int, Range(0, 8), Group("Ribs")] = 4,
    vented: bool = False,
    style:  Literal["rounded", "chamfered"] = "rounded",
) -> Part:
    ...

Widget mapping: float/int + Range → slider, bare numbers → number input, bool → checkbox, Literal/Enum → dropdown. Every parameter needs a default — defaults are the initial build. Multiple @app.part() functions in one file get a part selector. Add Group("Label") to a parameter's annotation to place it under a named collapsible section in the panel; ungrouped parameters render first. Add Desc("...") to show an info icon beside the parameter that reveals the description as a tooltip on hover.

Headless export

fastbuild export my_model.py enclosure --param width=120 -o enclosure.step

Values are validated against each parameter's Range; output format follows the extension (.step/.stp/.stl).

AI coding agents

FastBuild123 ships its own agent skill doc — API rules plus caching best practices in the Agent Skills format. Install it into your project so Claude Code, Codex, Cursor, and friends pick it up automatically:

fastbuild agent-docs --install   # writes .claude/skills/fastbuild123/ and .agents/skills/fastbuild123/

Re-run after upgrading the package; plain fastbuild agent-docs prints the doc to stdout instead. The library is also indexed on Context7 (configured via context7.json) for agents using the Context7 MCP server.

Requirements

Python 3.10–3.13 on macOS (Apple Silicon or Intel), Linux (glibc 2.31+, x86-64 or aarch64), or 64-bit Windows — wherever cadquery-ocp publishes wheels. Expect a ~500 MB install; the OpenCASCADE kernel is most of it. Alpine/musl is not supported.

Development

uv sync
uv run pytest
uv run fastbuild demo enclosure

Examples live in fastbuild/examples/ so they ship with the package and stay runnable via fastbuild demo. Specs live in specs/. The 3D component is a vendored, pinned build of three-cad-viewer (fastbuild/static/vendor/, see VERSION there) fed by ocp-tessellate output over a versioned websocket protocol.

License

MIT — see LICENSE. Bundles three-cad-viewer (MIT), whose license is included at fastbuild/static/vendor/LICENSE-three-cad-viewer.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastbuild123-0.1.4.tar.gz (635.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastbuild123-0.1.4-py3-none-any.whl (494.4 kB view details)

Uploaded Python 3

File details

Details for the file fastbuild123-0.1.4.tar.gz.

File metadata

  • Download URL: fastbuild123-0.1.4.tar.gz
  • Upload date:
  • Size: 635.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for fastbuild123-0.1.4.tar.gz
Algorithm Hash digest
SHA256 970cfcc15e695dda6b9b5c815dc31a35a55c3cd8044997581d146063ed51513d
MD5 1db08d7c20ffbe944e08a75fa671a0a9
BLAKE2b-256 7b383d7f88ac3aa86e9b7b69c09ebf23d14a36019fcec5247933ae7bb632b7be

See more details on using hashes here.

File details

Details for the file fastbuild123-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for fastbuild123-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3e88f5387d51e7a3c5e1bc39cd81ea84f963dbf0da0e23e9093832141c2cb5c6
MD5 d4472d7fdef920982b96f02f0d920c03
BLAKE2b-256 a103e342883abc4ba8fe60dd00ef2f5440584df1bc3d3e975060f85f976ed093

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.5

2 files

This release

0.1.4 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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