pygrbl_build
A collection of algorithms to generate G-code for GRBL diode lasers from different sources, plus tooling around the G-code itself. Five generators today:
- Line-to-Line (
l2l_gcode) — raster engraving from an image, with LaserGRBL fidelity. - Jarvis (
jarvis_gcode) — 1-bit Jarvis-Judice-Ninke error diffusion followed by the same raster G-code engine. The dots are short powered raster segments, as in LaserGRBL. - SVG vector (
svg_gcode) — vector tracing from an SVG (paths, basic shapes, groups, transforms), a faithful port of LaserGRBL's SVG import. Pure Python, no extra dependency. - Image vector (
img2vector_gcode) — outline tracing from a raster image (LaserGRBL's "Vectorize!"): the image is reduced to black/white, Potrace traces its outlines as closed contours, and each curve is emitted as G2/G3 arcs. Pure Python, Pillow only. Outlines only today (no interior filling yet). - Image to SVG (
img2svg) — the same Potrace trace asimg2vector_gcode, but the contours are written to a standard vector SVG instead of G-code. Inner contours become holes (fill-ruleevenodd), so you get the filled black silhouette potrace.exe produces. Pure Python, Pillow only.
Plus G-code bounds & framing (get_bounding_box +
generate_framing_gcode): a fast C parser for the bounding box of any
G-code (file or in-memory) and a framing pass that traces it, so the
operator can confirm placement before engraving.
Part of the pygrbl family, a set of libraries to manage GRBL.
Companion to pygrbl_streamer and pygrbl_server
Speed
This is the whole point. A full 300 mm @ 10 lines/mm raster job — nearly 4.7 million lines of G-code — comes out in ~0.34 s. LaserGRBL can take around 2 minutes to produce the same job: that's roughly a 350× speedup, and byte-for-byte the same output.
Install
pip install pygrbl-build
The only requirements are Pillow and a C compiler. Pillow is the single Python dependency (image loading and resizing); the C compiler is needed at install time because the raster engine ships as a C extension. Nothing else — no numpy, no runtime toolchain.
Use
from pygrbl_build import L2LProfile, l2l_gcode, write_gcode
profile = L2LProfile(width_mm=300.0, lines_per_mm=10.0, feed=3000, s_max=100)
write_gcode(l2l_gcode("shield.png", profile), "shield.nc")
Documentation
- Raster: Line-to-Line and Jarvis engraving, and the image inputs they accept.
- Vector: SVG to G-code, image to G-code outlines, and image to SVG.
- Bounds and framing: the bounding box of any G-code, and a framing pass around it.
- Output: writing G-code, lazy line iterators, and the public API.
- Changelog
- Releasing
Metadata
Release files for pygrbl-build 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pygrbl_build-1.0.1.tar.gz | 51.5 kB | Details |
Built distributions (wheels)
Total release size: 836.4 kB
Release files / pygrbl_build-1.0.1.tar.gz
| Download URL | pygrbl_build-1.0.1.tar.gz |
|---|---|
| Size | 51.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b121ad856bec018250c3874d86e7746855e4f4438363a60a48edab0ff6545600
|
|
BLAKE2b-256 checksum How to use checksums |
aab5e7a2e71c762cb6e8ae22ca4037a5195b10234fa0e4b739180f02f839904d
|
| 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 Sep 29, 2026.
Transparency logRelease files / pygrbl_build-1.0.1-cp314-cp314-win_amd64.whl
| Download URL | pygrbl_build-1.0.1-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 67.4 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
136044e6c00bcb78dbb9cb3401d452090349c6180be1e293441ed1c189b3b975
|
|
BLAKE2b-256 checksum How to use checksums |
b0b54e57a483e95cf39c3da889b85844c89f672b48d2aed7be34450ec6bc4e16
|
| 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 Sep 29, 2026.
Transparency logRelease files / pygrbl_build-1.0.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pygrbl_build-1.0.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 90.8 kB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
01b7ed7ad96ff4d675aa33c4aa9dfa923ebe41cc94b0680ae3d55c7eb6bb224a
|
|
BLAKE2b-256 checksum How to use checksums |
c75671a67205c5f9bf589638047fab81feb128099dc8e0661b8c47a449df8899
|
| 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 Sep 29, 2026.
Transparency logRelease files / pygrbl_build-1.0.1-cp313-cp313-win_amd64.whl
| Download URL | pygrbl_build-1.0.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 66.6 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3889f2e8cace642b901ca584229013d024729e05c6d44cd3e4a77d03c2b004e6
|
|
BLAKE2b-256 checksum How to use checksums |
ddd982161209cbb2b3f509a611bca592758e9c41a45e88eba72342edc5c6987c
|
| 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 Sep 29, 2026.
Transparency logRelease files / pygrbl_build-1.0.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pygrbl_build-1.0.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 90.7 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
50dc842cab782f202069cebd1f88bf6bd6d2d3a0da6c47e2dd86ea896c4f64dc
|
|
BLAKE2b-256 checksum How to use checksums |
f1554a6937c842a401d4220c8edc82410d16cb8e19562e900cfdaa92954452c2
|
| 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 Sep 29, 2026.
Transparency logRelease files / pygrbl_build-1.0.1-cp312-cp312-win_amd64.whl
| Download URL | pygrbl_build-1.0.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 66.6 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1f5bc60e4f739af1b7536bcbbb3ab08e382d2b1ed6903687c7b8576074f6c233
|
|
BLAKE2b-256 checksum How to use checksums |
7f01161b69e26a463c304b2ed9b198e08e3b5ba5045e6738dba52e173be7efb5
|
| 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 Sep 29, 2026.
Transparency logRelease files / pygrbl_build-1.0.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pygrbl_build-1.0.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 90.7 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
3a6feb3cec2b5796f6e2f5f448f1e41ce068d805c27d9788b2a872eba9b30b24
|
|
BLAKE2b-256 checksum How to use checksums |
d3a7e41d87dbb28dae4062f3ad60ba374b0e44ff11af195fbdb6d849efdc93a9
|
| 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 Sep 29, 2026.
Transparency logRelease files / pygrbl_build-1.0.1-cp311-cp311-win_amd64.whl
| Download URL | pygrbl_build-1.0.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 66.6 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
39508ce00e677f27aadfcee6e9964293771a96f22cbf1dcf7d8a0aba254af394
|
|
BLAKE2b-256 checksum How to use checksums |
d677b8668baf8abd8a687e4aad567cb90323eed39378c64be0d413da3fe93761
|
| 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 Sep 29, 2026.
Transparency logRelease files / pygrbl_build-1.0.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pygrbl_build-1.0.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 89.9 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
fc6d60269267b1c191c80b9ef546cc0547deefb0db96c1ca869bdb238fc38ff9
|
|
BLAKE2b-256 checksum How to use checksums |
1446419aaa06757c940ad03c182e8194036658219672936f1817f04d4967a90b
|
| 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 Sep 29, 2026.
Transparency logRelease files / pygrbl_build-1.0.1-cp310-cp310-win_amd64.whl
| Download URL | pygrbl_build-1.0.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 66.6 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4fda457bc33e968e11afaf38fec0693113557f24557d573840e8db5b5e8ee18c
|
|
BLAKE2b-256 checksum How to use checksums |
f500974e2b33c1029233fb3b7c8985cb760609f4e7a2c5fc3e52b78204a92400
|
| 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 Sep 29, 2026.
Transparency logRelease files / pygrbl_build-1.0.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pygrbl_build-1.0.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 88.9 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d50f7c65a71359e789ef1f10e186a92c326c586039ccd6b8cab5e9ddd103c430
|
|
BLAKE2b-256 checksum How to use checksums |
6420d9fb5c333e2e70d649bfcb7404a4c1057e5c695c1371980e512ff79b2db0
|
| 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 Sep 29, 2026.
Transparency log