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.5.tar.gz (636.3 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.5-py3-none-any.whl (495.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fastbuild123-0.1.5.tar.gz
Algorithm Hash digest
SHA256 be278f520095fe6ea8b4208318965b1cf567c6e54f7b48e58d25e0f6fcb68a69
MD5 3de33d7f9df63564bebe37a3825a2f78
BLAKE2b-256 6b107c59f9fa92449fbea304fbb1530c49b6ab3ff4244613a7108a83425b05ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastbuild123-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 44fd6e7cc0130e4fb13cfbac356553619f99393747ef8f5ab080521d55a8056b
MD5 36647c963dbe6a4fc649c579abe0c57b
BLAKE2b-256 b47f66196b7e092aad13ba63d27d7c4d12340dff9beaf68a0aa974cdf2b744e9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 files

0.1.4

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