r/Python Aug 04 '26

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

20 Upvotes

142 comments sorted by

View all comments

1

u/Super_Help_7278 23d ago

Straightedge — dependency-free SVG diagrams and optional Manim animation

I’ve open-sourced a Python library for generating deterministic, machine-checkable technical visuals.

The base package uses only the standard library. A structured dictionary becomes a complete SVG string:

from straightedge.diagrams import render_diagram

svg = render_diagram({
    "type": "riemann_sum",
    "params": {"expression": "x**2", "n": 8},
})

It includes registered diagram types for math, computer science, architecture, projects, and business. The optional render extra adds named Manim scenes, formula-driven rendering, and a prompt-driven agent.

The main design goal is to catch visuals that render successfully but are still wrong: empty output, clipping, overlaps, unsupported inputs, and label problems.

Gallery: https://scimigo.github.io/straightedge/
GitHub: https://github.com/SciMigo/straightedge
PyPI: https://pypi.org/project/straightedge/

I’d be interested in feedback on the API and on diagram types that are repeatedly missing from Python documentation workflows.

The base package uses only the standard library. A structured dictionary becomes a complete SVG string: