Skip to main content

SqlAlchemy schema display script

Project description


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

Output formats:


  • python >= 2.5
  • SQLAlchemy >= 0.5


pip install sadisplay

From bitbucket:

pip install
# or


Write simple script in your project environment:

import codecs
import sadisplay
from yourapp import model

desc = sadisplay.describe(
    [getattr(model, attr) for attr in dir(model)],
with'schema.plantuml', 'w', encoding='utf-8') as f:
with'', 'w', encoding='utf-8') as f:

# Or only part of schema
desc = sadisplay.describe([model.User, model.Group, model.Persmission])
with'auth.plantuml', 'w', encoding='utf-8') as f:
with'', 'w', encoding='utf-8') as f:

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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sadisplay, version 0.4.9
Filename, size File type Python version Upload date Hashes
Filename, size sadisplay-0.4.9-py2.py3-none-any.whl (9.6 kB) File type Wheel Python version 3.6 Upload date Hashes View
Filename, size sadisplay-0.4.9.tar.gz (9.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page