skip to navigation
skip to content

sadisplay 0.4.2

SqlAlchemy schema display script

.. -*- restructuredtext -*-


Simple package for describing SQLAlchemy schema and display raw database
tables. Relation detecting by `ForeignKey` columns.
Supports mapped class inherit. BSD licensed.

Output formats:

* `PlantUML <http:""/>`_ class diagram
* `DOT <http:""/>`_ graphviz directed graphs

* python >= 2.5
* SQLAlchemy >= 0.5



pip install sadisplay

From bitbucket::

pip install
# or


SQLAlchemy model:

.. include:: examples/

Write simple script in your project environment::

import sadisplay
from yourapp import model

desc = sadisplay.describe([getattr(model, attr) for attr in dir(model)])
open('schema.plantuml', 'w').write(sadisplay.plantuml(desc))
open('', 'w').write(

# Or only part of schema
desc = sadisplay.describe([model.User, model.Group, model.Persmission])
open('auth.plantuml', 'w').write(sadisplay.plantuml(desc))
open('', 'w').write(

Render PlantUML class diagram::

$ java -jar plantuml.jar schema.plantuml

# or for svg format
$ java -jar plantuml.jar -Tsvg schema.plantuml

Render graph by graphviz::

$ dot -Tpng > schema.png

Also you can display you sql database tables by reflecting feature::

$ sadisplay -u <url connection="" string="" to="" db=""> -r dot >
$ dot -Tpng > schema.png  
File Type Py Version Uploaded on Size
sadisplay-0.4.2-py2.py3-none-any.whl (md5) Python Wheel 3.5 2015-12-16 8KB
sadisplay-0.4.2.tar.gz (md5) Source 2015-12-16 8KB
  • Downloads (All Versions):
  • 42 downloads in the last day
  • 313 downloads in the last week
  • 1661 downloads in the last month