github patrickchugh/terravision v0.38.0
v0.38.0 — Native draw.io Emitter

latest release: v0.38.1
7 hours ago

Highlights

TerraVision now generates .drawio files natively using Python's built-in xml.etree.ElementTree — no more pygraphviz C-extension compilation, no platform-specific workarounds, no [drawio] optional dependency. draw.io export works out of the box on all platforms.

What's New

Native draw.io emitter (issue #188)

  • Replaced the graphviz2drawio library with a pure-Python mxGraph XML emitter
  • Uses draw.io's built-in AWS4 stencil shapes with correct fill colors per service category
  • Uses draw.io's built-in Azure SVG image paths (img/lib/azure2/)
  • GCP icons embedded as base64 PNGs from TerraVision's local icon library

Improved edge routing

  • Edges now use draw.io's native orthogonalEdgeStyle routing instead of Graphviz spline waypoints
  • Eliminates edges crossing through containers

Auto-generated shape mappings

  • _CLASS_TO_ALIAS map auto-generated at runtime from resource_classes/ (~850 entries)
  • Shape map generator updated to fetch Sidebar-AWS4.js (authoritative source) for AWS shapes
  • Azure shape maps use img/lib/azure2/ SVG paths instead of legacy stencil XML

Breaking Changes

  • Removed graphviz2drawio dependency — no longer needed
  • Removed [drawio] optional install group from pyproject.toml
  • Removed drawio_shape_map_gcp.py — GCP uses embedded PNGs, not draw.io stencils

Installation

draw.io export now requires zero extra setup:

pip install terravision
terravision draw --source ./terraform --format drawio --outfile my-diagram

The previous platform-specific workarounds (Apple Silicon compiler flags, Windows Graphviz paths) are no longer needed.

Don't miss a new terravision release

NewReleases is sending notifications on new releases.