PythonSCAD STL Generator
PythonSCAD STL Generator is a small command line tool for batch-rendering
PythonSCAD design files. It scans a directory for Python files that import
pythonscad, renders each design with the pythonscad executable from
PATH, and optionally renders once per customizer preset from a sibling JSON
file.
Installation
Install the published package with pipx:
pipx install pythonscad-stl-generator
Or install it into an existing environment with pip:
python -m pip install pythonscad-stl-generator
For development:
git clone https://github.com/nomike/pythonscad-stl-generator.git
cd pythonscad-stl-generator
python -m pip install -e ".[dev]"
PythonSCAD itself is not bundled. The tool expects a pythonscad executable to
be available on PATH, or you can point to it explicitly with
--pythonscad=/path/to/pythonscad.
Usage
From a directory containing PythonSCAD designs:
generate-pythonscad-stls
The command writes STL files to output/ by default. A Python file is treated
as a design when it imports pythonscad, for example:
from pythonscad import *
width = add_parameter("width", 20)
cube([width, width, width]).show()
Useful options:
generate-pythonscad-stls --output-dir stls
generate-pythonscad-stls --pythonscad ~/bin/pythonscad
generate-pythonscad-stls --format 3mf
generate-pythonscad-stls --dry-run --verbose
generate-pythonscad-stls --recursive
The generated PythonSCAD command includes --trust-python, because PythonSCAD
requires that flag for command-line execution of Python input files.
Customizer Presets
If box.py has a sibling box.json, the tool reads its top-level
parameterSets object and renders once per preset:
{
"parameterSets": {
"small": {
"width": "10"
},
"large": {
"width": "50"
}
},
"fileFormatVersion": "1"
}
This produces files like:
output/box-small.stl
output/box-large.stl
Without a sibling preset file, the design renders once to output/box.stl.
Up-To-Date Checks
Existing output files are skipped when they are newer than their inputs. For a
plain design, the input is the .py file. For preset renders, both the .py
file and the sibling .json preset file must be older than the output.
Use --force to render everything regardless of timestamps.
Development
Run tests:
python -m pytest
Run linting and formatting:
ruff check .
ruff format .
Run all pre-commit hooks:
pre-commit run --all-files
License
This project is licensed under the MIT License. See LICENSE.
Metadata
Release files for pythonscad-stl-generator 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pythonscad_stl_generator-0.1.2.tar.gz | 12.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pythonscad_stl_generator-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.3 kB
Release files / pythonscad_stl_generator-0.1.2.tar.gz
| Download URL | pythonscad_stl_generator-0.1.2.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
958bfed0d235c96da0a0cb4d43c3e13fcd2dbba1c5b29c53fbb600094bc07573
|
|
BLAKE2b-256 checksum How to use checksums |
994d542329ea548666699b68088b4f2fed9c2d09488fed5adff42379e7e2c789
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 30, 2026.
Transparency logRelease files / pythonscad_stl_generator-0.1.2-py3-none-any.whl
| Download URL | pythonscad_stl_generator-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86e259d24e94b7bcb47f77011f226968de967cfedc5d021095448a76ec9f8bda
|
|
BLAKE2b-256 checksum How to use checksums |
66e2f8909ab4b9690e8727ee4345db2ee2ccfab9d0a1b9546206044e4ad34136
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 30, 2026.
Transparency logSecurity for pythonscad-stl-generator 0.1.2
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 2 files in this release have been uploaded with provenance metadata.
Attestation for pythonscad_stl_generator-0.1.2.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 Aug 30, 2026.
Transparency logA 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.