Show HN: Easily Visualize Your SQLAlchemy Data Models in a Nice SVG Diagram
github.com
github.com
I attempted to also generate an HTML file containing the embedded SVG as well as some JS to enable nice interactive hover-on effects (I wanted to highlight the border of the table you hover over and then change all the outgoing connections to other tables to be red, and all incoming connections to that table to be green), but it wasn't working and started turning into a slog after an hour. If anyone knows how to do this, please submit a PR!
Useful to have in a CICD pipeline so you always have an up-to-date schema diagram available.
python3.11/site-packages/sqlalchemy_data_model_visualizer.py", line 5, in <module> from sqlalchemy.orm import sessionmaker, declarative_base, relationship ImportError: cannot import name 'declarative_base' from 'sqlalchemy.orm'
doesn't work with the older sqlalchemy
In regards to difficulty finding alternatives, many database management tools (like DataGrip and Dbeaver) have ER diagram generators that work for all the types of databases the tools work for... so basically vendor agnostic. Other tools like Visio (blast from the past) do too.