ERAlchemy generates Entity Relation (ER) diagram (like the one below) from databases or from SQLAlchemy models.
To install ERAlchemy, just do:
$ pip install eralchemy
ERAlchemy
requires GraphViz to generate the graphs.
from eralchemy import draw_er
## Draw from SQLAlchemy base
draw_er(Base, 'erd_from_sqlalchemy.png')
## Draw from database
draw_er("sqlite:///relative/path/to/db.db", 'erd_from_sqlite.png')
$ eralchemy -i sqlite:///relative/path/to/db.db -o erd_from_sqlite.png
Thanks to it's modular architecture, it can be connected to other ORMs/ODMs/OGMs/O*Ms.
Every feedback is welcome on the GitHub issues.
To run the tests, use : $ py.test
.
ERAlchemy was inspired by erd.
Released under an Apache License 2.0
Creator: Alexis Benoist @Alexis_Benoist