从数据库生成ER图的工具:ERAlchemy

dy83 9年前

ERAlchemy一个能够从数据库或SQLAlchemy模型生成Entity Relation (ER)图。

Install

To install ERAlchemy, just do:

$ pip install eralchemy

ERAlchemyrequires GraphViz to generate the graphs.

Use from python

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')

Use from the command line

$ eralchemy -i sqlite:///relative/path/to/db.db -o erd_from_sqlite.png

项目主页:http://www.open-open.com/lib/view/home/1431958331739