Skip to main content

specify-core

Add manufacturing intent to a STEP part, and write it as AP242 semantic PMI.

specify-core reads a STEP part, recognises its features (holes with their counterbores and threads, hole patterns, slots, bosses, fillets and turned bodies) and works out what a manufacturer still needs to know: the material, datums, fits, thread classes, hole positions, surface finish and the general tolerance. It asks a question for each gap, with a suggested default and the reason for it. Your answers are written back into the STEP as AP242 semantic PMI (GD&T that CAD and inspection tools can read), and the file is read back to verify it.

It is deterministic: rules and standards tables, no AI. The answers are stored in the file too, so a later revision of the part can be opened and carried on with.

  • No dependencies: no OpenCascade, build123d or quiddity. The engine is Rust, in one wheel.
  • Wheels for Linux (x86_64, aarch64), macOS (Apple silicon, Intel) and Windows, for CPython 3.11 and later.
  • Apache-2.0.

It is the engine behind Draftwright Specify, which adds a 3D review of the same questions in the browser.

Install

pip install specify-core

Python

from specify_core import api

analysis = api.analyse("plate.step")         # features, faces and any existing PMI

for q in api.questions(analysis, {}):         # what is still unknown
    print(q.id, "|", q.prompt, "| default:", q.default)

answers = {"part.material": "6082-T6", "hole.function:holes:9": "fit:H7"}
intent = api.apply(analysis, answers, accept_defaults=True)   # suggested defaults for the rest
report = api.write("plate.step", intent, "plate-pmi.step", answers=answers)

print(report.written)       # ['datum A', 'Ø8 H7 on holes:9', 'position 0.05 on holes:9', ...]
print(report.not_written)   # anything that could not be written, with the reason,
                            # including an answer whose question is not asked

Write reports optionally include geometry_carrier_exemptions ({part, condition, aspect, feature}), preserved_normalizations ({id, normalization}), presentation_warnings (strings), retained_shared (ids of support Replace kept for PMI it cannot read) and saved_view_findings ({kind, part, ids, entity, detail} findings about the default Notes saved view). to_dict() omits empty lists. The v0.4.8 kernel preserves original entity text during Add, including when adding a separate datum feature on a kept carrier. Add upgrades requiring source repairs raise a clear RuntimeError naming the entities and repair; Specify never retries with Replace.

Opening the written file again picks up where you left off: api.analyse("plate-pmi.step")["resume"]["answers"] returns the answers stored in it.

The main functions, all in specify_core.api:

Function What it does
parts(step) Lists an assembly's parts.
load(path, part=None) Reads a file once; pass the returned LoadedPart to the others instead of a path.
analyse(step, part=None) Recognises features and reads existing PMI. Returns the analysis (a dict).
questions(analysis, answers) The questions, given the answers so far (Question objects).
apply(analysis, answers, accept_defaults=False) Turns answers into the intent to write. Raises IncompleteError naming what is still missing, unless defaults are accepted.
preview(analysis, answers) The intent the answers so far would give, without requiring every answer.
write(step, intent, output, answers=None) Writes the PMI (and the answers) and verifies the file. Returns a WriteReport.
write_parts(step, intents, output) The same for several parts of an assembly, in one file.
mesh(step, part=None, *, max_deviation_mm=None) Triangles grouped by face index, for showing the part and picking faces.

Answers are a dict of question id to value, e.g. {"part.material": "6082-T6"}. Requirements no question asked for (a flatness, a fit, a finish on faces you choose) are added as extra.* answers.

Command line

specify-core analyse plate.step -o plate.analysis.json
specify-core questions plate.analysis.json --open                # unanswered questions, as JSON
echo '{"part.material": "6082-T6"}' > answers.json
specify-core write plate.step plate.analysis.json answers.json --accept-defaults -o plate-pmi.step

specify-core parts lists an assembly's parts and --part picks one; write takes an analysis and answers pair for each part to write together. specify-core mesh writes the face-indexed triangles.

For a host program

specify-core serve answers JSON requests, one per line, on stdin and stdout. Each request carries everything it needs, so a restarted process loses nothing. This is how an application drives it as a child process:

{"id": 1, "op": "analyse", "step": "/path/part.step"}
{"id": 2, "op": "questions", "analysis": {...}, "answers": {...}}
{"id": 3, "op": "write", "step": "/path/part.step", "output": "/path/out.step", "analysis": {...}, "answers": {...}, "accept_defaults": true}

Each reply is {"id", "ok": true, "result"} or {"id", "ok": false, "error": {"code", "message"}}, where the code is incomplete (with what is missing), invalid or failed. analyse replies with the analysis and the mesh; write with the report and the intent. analyse accepts optional "max_deviation_mm": 0.05 for its mesh. It must be a finite number of at least 0.001 mm; invalid or unmet bounds return invalid. Omitting it (or null) preserves the default mesh. Requested meshes add max_deviation_mm and achieved_deviation_mm; see mesh tolerance. specify_core.serve.reply(request) answers the same requests in-process.

What it writes

AP242 semantic PMI: datums and datum systems, size dimensions with ± and fit tolerances, location dimensions, position, flatness, perpendicularity, parallelism, profile and runout tolerances, threads, knurls, surface texture, material, notes and the general tolerance. Every file is read back and checked before it is kept.

Status: early (0.x). The JSON formats may change between minor versions; changes are listed in the changelog. Draftwright® is a registered trade mark of Betwixt Ltd.

Complete answer sidecars (defaults explicit, with geometry evidence) can be exported before writing: api.export_answers(step, analysis, answers) returns a dict. Incomplete sets and unresolved carries are refused. See answer files.

Metadata

Release files for specify-core 0.1.17

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

Source distribution (sdist)

Source distribution for specify-core 0.1.17
File Size Uploaded Provenance Actions
specify_core-0.1.17.tar.gz 479.5 kB With provenance Details for specify_core-0.1.17.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for specify-core 0.1.17
File Actions
specify_core-0.1.17-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for specify_core-0.1.17-cp311-abi3-win_amd64.whl
specify_core-0.1.17-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for specify_core-0.1.17-cp311-abi3-manylinux_2_28_x86_64.whl
specify_core-0.1.17-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for specify_core-0.1.17-cp311-abi3-manylinux_2_28_aarch64.whl
specify_core-0.1.17-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for specify_core-0.1.17-cp311-abi3-macosx_11_0_arm64.whl
specify_core-0.1.17-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for specify_core-0.1.17-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 49.7 MB

Release files / specify_core-0.1.17.tar.gz

Download URL specify_core-0.1.17.tar.gz
Size 479.5 kB
Tags Source
SHA-256 checksum
How to use checksums
24f18c99146213ed5b9ab2898021fa662d695222c6bd4e274c4c1d2c4c19b7cf
BLAKE2b-256 checksum
How to use checksums
119564b5dc953e00dc739047db3d794a52d571b2e232dd950d8037229f217b84
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 16, 2026.

Transparency log

Release files / specify_core-0.1.17-cp311-abi3-win_amd64.whl

Download URL specify_core-0.1.17-cp311-abi3-win_amd64.whl
Size 10.3 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e386ad288758b1349aac69beb577920d94240b0cc4d2aedd697b4346e0163fa2
BLAKE2b-256 checksum
How to use checksums
5a08433aba42285e0da2c0dfd09ebd721095a121d106ad9290060ad977f7e5e9
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 16, 2026.

Transparency log

Release files / specify_core-0.1.17-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL specify_core-0.1.17-cp311-abi3-manylinux_2_28_x86_64.whl
Size 10.4 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
241dad09cea07c8a6f463d5f18bab73f99c367664415b1a1ec78fa738adfcd16
BLAKE2b-256 checksum
How to use checksums
85d553d499f2e84205b3cfbc3f58a78aa5feadc9239d988e199602e4cafe3d04
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 16, 2026.

Transparency log

Release files / specify_core-0.1.17-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL specify_core-0.1.17-cp311-abi3-manylinux_2_28_aarch64.whl
Size 9.4 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
3923174417fa42224b6f640289c4cf69a0dd5d093cea3e0b67e8664e77629dbe
BLAKE2b-256 checksum
How to use checksums
b69ffb6b45981ad922032a9ff81c48b7825dccb9059cbdc9dc90dd4c456647f4
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 16, 2026.

Transparency log

Release files / specify_core-0.1.17-cp311-abi3-macosx_11_0_arm64.whl

Download URL specify_core-0.1.17-cp311-abi3-macosx_11_0_arm64.whl
Size 9.2 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fe99a488b132e69cae41a22d6cf20d27f3cf2285d6ff9d95a929478ffcc139a5
BLAKE2b-256 checksum
How to use checksums
2c157bf346f1dc17671de25abd7be791be03d17fa8e22f8ce47f6f446fe1dcdb
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 16, 2026.

Transparency log

Release files / specify_core-0.1.17-cp311-abi3-macosx_10_12_x86_64.whl

Download URL specify_core-0.1.17-cp311-abi3-macosx_10_12_x86_64.whl
Size 9.9 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d8950519d83a9d2660ec10aca109c3b33d0a5ebe2e00549da56f60fd9c14925f
BLAKE2b-256 checksum
How to use checksums
fc769ba8537be5ae898e69a36a530cb264bb6b66b74c909221dcac0299f30d5b
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 16, 2026.

Transparency log

Security for specify-core 0.1.17

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

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for specify_core-0.1.17.tar.gz

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