schemdraw
Electrical circuit schematic drawing
What it is and what it does
Schemdraw is a Python library for drawing electrical circuit schematics programmatically. It provides a fluent API to place and connect standard electrical components—resistors, capacitors, transistors, opamps, and many others—and render them as high-quality SVG diagrams. Beyond circuits, it also supports timing diagrams, state machines, and flowcharts, making it useful for technical documentation, educational materials, and circuit design workflows.
The package has no external runtime dependencies, making installation lightweight. It supports Python 3.9 and later and has been actively maintained since its initial release in 2014, with a recent update 77 days ago. The library is designed for engineers, educators, and researchers who need to generate schematics programmatically rather than through GUI tools.
Use it for:
- Generate circuit schematics for technical documentation and educational textbooks.
- Create timing diagrams to visualize signal behavior in digital circuits.
- Draw state machine diagrams for control system design and verification.
- Produce flowcharts for algorithm and process documentation.
- Automate schematic generation in circuit design workflows or batch processing.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Schemdraw generates high-quality electrical circuit schematic diagrams as SVG output, with built-in symbols for resistors, capacitors, diodes, transistors, opamps, and other components, plus support for timing diagrams, state machines, and flowcharts.
Yes. Schemdraw is a solid choice for anyone needing to generate electrical schematics programmatically. It has zero runtime dependencies, active maintenance, broad Python version support, and a permissive MIT license. The 77-day-old release and no known vulnerabilities indicate a stable, well-maintained project. Install it if you need SVG circuit diagrams in code.
Install
schemdraw on PyPI
pip
pip install schemdrawuv
uv add schemdrawpoetry
poetry add schemdrawInstalling schemdraw
Before you install
Installation is straightforward with no runtime dependencies. The package is actively maintained with a recent release (77 days ago) and has been in development since 2014, supporting current Python versions (3.9 through 3.14).
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
import schemdraw
import schemdraw.elements as elm
with schemdraw.Drawing(file='schematic.svg') as d:
elm.Resistor().label('100KΩ')
elm.Capacitor().down().label('0.1μF', loc='bottom')
elm.Line().left()
elm.Ground()
elm.SourceV().up().label('10V')
Requires Python 3.9 or later.
Verify before relying
- Whether the package can export to formats other than SVG (e.g., PNG, PDF).
- Performance characteristics when drawing large or complex schematics.
- Whether interactive editing or real-time preview is supported.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 77 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 543,221/month — #6,084 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: schemdraw-0.23-py3-none-any.whl
Keywords: circuit, schematic, electrical, flowchart, logic
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
aggdrawaggdraw provides high-quality 2D drawing for…
permissive · top 15,000 on PyPI
wavedromConverts WaveDrom-compatible JSON…
permissive · top 15,000 on PyPI
blockdiagblockdiag generates block-diagram images from a…
permissive · top 15,000 on PyPI
mermaid-builderProgrammatically generates MermaidJS diagram…
permissive · top 15,000 on PyPI
seedirGenerates ASCII tree diagrams of folder…
permissive · top 15,000 on PyPI
genbadgeGenerates SVG badges for CI/CD tools and test…
permissive · top 15,000 on PyPI
pystructurizrPyStructurizr provides a Python DSL for…
permissive · top 15,000 on PyPI
svg.pyGenerates SVG files programmatically in Python…
permissive · top 15,000 on PyPI
gdsfactoryGDSFactory generates CAD files (GDS, OASIS,…
unclear · top 15,000 on PyPI
schematichqProvides a Python client library for the…
permissive · top 15,000 on PyPI