cadquery
CadQuery is a parametric scripting language for creating and traversing CAD models
What it is and what it does
CadQuery is a Python library that lets you describe 3D CAD models using code rather than a graphical interface. You write scripts that define geometry—boxes, extrusions, fillets, lofts, and assemblies—and CadQuery translates them into high-quality CAD files. It wraps the OpenCASCADE kernel through its cadquery-ocp dependency, giving you access to industrial-strength modeling without leaving Python.
The library is designed for automation, integration into servers, and scientific workflows. It includes built-in visualization via trame and vtk, and works with Jupyter notebooks and the optional CQ-editor GUI. You can create parametric models where end users customize dimensions or features by editing script variables, then regenerate the entire design. Output formats include lossless STEP and DXF as well as mesh formats like STL and 3MF.
Use it for:
- Generate STEP files programmatically for mechanical parts, enclosures, or assemblies in manufacturing workflows.
- Build parametric design tools where non-programmers adjust dimensions in a script and re-run to produce new CAD models.
- Automate repetitive CAD tasks—batch-generating variants, applying design rules, or integrating CAD into CI/CD pipelines.
- Create scientific or engineering simulations that output CAD geometry for visualization or further analysis.
- Embed 3D model generation in web services or backend systems without requiring a GUI CAD application.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
CadQuery is a Python library for writing scripts that generate parametric 3D CAD models, outputting to formats like STEP, STL, DXF, VRML, AMF, and 3MF.
Yes. CadQuery is production-stable (Development Status 5), actively maintained, permissively licensed, and has no known vulnerabilities. Install friction is low for supported Python versions (3.11+). It is the right choice if you need to generate or manipulate 3D CAD models programmatically; if you require a graphical CAD editor, use CQ-editor alongside it or choose a different tool.
Install
cadquery on PyPI
pip
pip install cadqueryuv
uv add cadquerypoetry
poetry add cadqueryInstalling cadquery
Before you install
Low friction: distributed as a wheel for Python 3.9–3.12 on Linux, macOS, and Windows, though some older Linux distributions are not supported. Active maintenance with a release 54 days ago and 5601 repository stars.
License in practice
Licensed under Apache Public License 2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install cadquery
from cadquery.func import box, fillet
from cadquery.vis import show
b = box(1, 1, 1)
show(fillet(b, b.edges("|Z"), 0.1))
Requires Python 3.11 or later; pip installation is limited to Python 3.9–3.12 on Linux, macOS, and Windows, with some older Linux distributions unsupported—conda installation recommended for broader compatibility.
Verify before relying
- Whether the 13 runtime dependencies (including cadquery-ocp, trame, casadi, nlopt) are all required for basic use or only for advanced features.
- Performance characteristics and model complexity limits for large assemblies or high-resolution exports.
Package facts
| License | Apache Public License 2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 13 — cadquery-ocp, ezdxf, multimethod, nlopt, runtype, casadi, trame, trame-vtk, trame-components, trame-vuetify, pyparsing, scipy, numba |
| Maintenance | actively maintained — 54 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 704,227/month — #5,276 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cadquery-2.8.0-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
cadquery-ocpcadquery-ocp provides Python bindings to the…
permissive · top 5,000 on PyPI
cadquery-ocp-novtkProvides Python bindings to the Open CASCADE…
permissive · top 15,000 on PyPI
ocp-tessellateConverts OCP (OpenCascade Python bindings) CAD…
permissive · top 15,000 on PyPI
build123dbuild123d is a Python CAD framework for…
permissive · top 15,000 on PyPI
ocp-gordonInterpolates networks of curves into smooth…
permissive · top 15,000 on PyPI
manifold3dManifold3d creates and operates on manifold…
permissive · top 5,000 on PyPI
cascadioConverts STEP files to GLB (glTF binary) format…
unclear · top 15,000 on PyPI
numpy-stlReads, writes, and modifies STL mesh files…
permissive · top 15,000 on PyPI
gmshGmsh is a three-dimensional finite element mesh…
copyleft · top 15,000 on PyPI