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, 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")] = 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.

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.2.tar.gz (633.6 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.2-py3-none-any.whl (493.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fastbuild123-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6adad664d34cbcb9a6c80162214bf32cfd8a6a7f3a536042e8671ca1558ae809
MD5 63a3a3b2ca983708faed058972ffc811
BLAKE2b-256 770db83addcb4f17005d450b63ebfc110021414750500a52e71339935786a9c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastbuild123-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 55433da0232d70bdcd5df7440b0854ecb5a6430bd8b96abfa6928bc029d3c44f
MD5 d3e4231df8a9216310597f037c95353b
BLAKE2b-256 cd4418b8abbff09c9dda7ad85b47bf88349385d802bb526c10dc206b5bd00f2c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

This release

0.1.2 This release

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