schematizer
Turn a generic, hierarchical netlist (JSON) into a KiCad schematic or an SVG drawing of one.
schematizer does the graphical half of EDA: it takes a tool-neutral netlist
document and does all the drawing work — component placement, wire routing, and
writing either editable .kicad_sch files or static, cross-linked .svg pages
for a selected KiCad version (6–10). It is not tied to any particular front end: any tool that emits the netlist format can use
it. SKiDL is the first such producer —
SKiDL describes electrical interconnection in code and hands the netlist to
schematizer — but the input is just JSON, so other generators work too.
The netlist document (produced by
skidl.schematic_netlist.build_generic_netlist, or any equivalent emitter)
embeds each component's symbol definition and carries layout hints —
component mirror/rotate (symtx) and net stubbing (stub/netio). Because
symbols are embedded, this tool needs no access to KiCad symbol libraries.
Install
pip install schematizer
Command-line use
# netlist.json -> KiCad 9 schematic files in ./out/
schematizer netlist.json --tool kicad9 -o out --top-name mydesign
# ...or a set of linked SVG pages instead
schematizer netlist.json --tool kicad9 -o out --top-name mydesign --format svg
Library use
import json
from schematizer import render
with open("netlist.json") as f:
netlist = json.load(f)
render(netlist, tool="kicad9", filepath="out", top_name="mydesign")
render(netlist, tool="kicad9", filepath="out", format="svg")
render() also accepts a path to the JSON file directly.
How it fits with SKiDL
To the SKiDL end user nothing changes: Circuit.generate_schematic() and
Circuit.generate_svg() build the generic netlist internally and call render()
here (with format="kicad" and format="svg" respectively). Because the seam is a
plain JSON document, schematizer can be iterated and improved independently of
SKiDL — and reused by any other front end that emits the same format.
Status
Self-contained. The placement/routing/writer engine is vendored under
schematizer/engine, and the netlist is reconstructed into a lightweight
intermediate representation (schematizer.ir: SchPart/SchPin/SchNet) that
the engine consumes directly — no .kicad_sym re-parse, no KiCad library
access, and no runtime dependency on skidl. The only runtime dependency is
simp_sexp. The KiCad power-symbol library (for GND/rail nets) is vendored in
schematizer/data.
Output formats
--format kicad (the default) writes editable .kicad_sch files.
--format svg writes static .svg pages instead:
schematizer netlist.json --tool kicad9 --format svg -o out
Both come off the same placement and routing pass and differ only in the final
serialization, so an SVG page has the layout of the .kicad_sch it would have
produced. Symbols are drawn from the graphics embedded in the netlist, so SVG
output needs no KiCad libraries either.
--flatness controls hierarchy for both formats. At 0.0 (the default) every
subcircuit gets its own page; in the SVG output a child appears on its parent's
page as a hyperlinked rectangle, and each child page carries links back to
its parent and to the top sheet, so a hierarchical design can be clicked
through in a browser. At 1.0 everything collapses onto one page, and values
in between flatten only the smaller subcircuits.
Each SVG page is sized to its drawing rather than to an A-size sheet, since an SVG renders at whatever size it declares.
Randomized layout
Placement starts parts at random positions and the router breaks ties randomly, so the same netlist produces a different — equally valid — drawing on every run. There is no way to pin a layout down: if you get one you want to keep, keep the generated files.
Supported KiCad versions
--tool accepts kicad6 … kicad10, which share one modern S-expression
writer (with a couple of KiCad-8 format toggles). The version still matters for
--format svg, because the embedded symbol graphics are KiCad-version flavored.
KiCad 5 is not supported and is rejected with an explanatory error. It
needs the legacy EESCHEMA .sch format rather than .kicad_sch, and KiCad 5
libraries describe symbols in a different, non-s-expression form that the
generic netlist does not carry.
Metadata
Release files for schematizer 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| schematizer-0.1.0.tar.gz | 148.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| schematizer-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 302.1 kB
Release files / schematizer-0.1.0.tar.gz
| Download URL | schematizer-0.1.0.tar.gz |
|---|---|
| Size | 148.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
946158f6003a860b1fe27dd84e57ac4a1a171b7a89704e725b01acf090533af8
|
|
BLAKE2b-256 checksum How to use checksums |
b345734c0afa78f2cd9c4507f3626d280dc6d7892d778c0a3cf7e5c197d6adc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / schematizer-0.1.0-py3-none-any.whl
| Download URL | schematizer-0.1.0-py3-none-any.whl |
|---|---|
| Size | 153.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfe429fdbcfa582c344d75419d8c0f3bd2580dd566c6b772614e0c15e5e0fa9a
|
|
BLAKE2b-256 checksum How to use checksums |
5a7108067d0f3f86762c93e10d9eb58afffa3fc0c1718e4995e87cba44e5fe2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|