Skip to main content

sadisplay

About

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

Output formats:

Requirements

  • python >= 2.5

  • SQLAlchemy >= 0.5

Install

pip install sadisplay

From bitbucket:

pip install http://bitbucket.org/estin/sadisplay/get/tip.tar.gz
# or
easy_install http://bitbucket.org/estin/sadisplay/get/tip.tar.gz

Usage

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)],
    show_methods=True,
    show_properties=True,
    show_indexes=True,
)
with codecs.open('schema.plantuml', 'w', encoding='utf-8') as f:
    f.write(sadisplay.plantuml(desc))
with codecs.open('schema.dot', 'w', encoding='utf-8') as f:
    f.write(sadisplay.dot(desc))

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

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.dot > schema.png

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

$ sadisplay -u <URL connection string to db> -r dot > schema.dot
$ dot -Tpng schema.dot > schema.png

Metadata

Release files for sadisplay 0.4.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sadisplay 0.4.9
File Size Uploaded Provenance Actions
sadisplay-0.4.9.tar.gz 9.5 kB Without provenance Details for sadisplay-0.4.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sadisplay 0.4.9
File Interpreter ABI Platform Actions
sadisplay-0.4.9-py2.py3-none-any.whl Python 3, Python 2 none any Details for sadisplay-0.4.9-py2.py3-none-any.whl

Total release size: 19.2 kB

Release files / sadisplay-0.4.9.tar.gz

Download URL sadisplay-0.4.9.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
af67160f89123886ab42b247262862bfcde0a3c236229ecdd59de0a1e8e35d96
BLAKE2b-256 checksum
How to use checksums
c3be8f205a8e77bcc9d8b0ddb661b16ab6866f72f7c311a987700bf331b3263c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / sadisplay-0.4.9-py2.py3-none-any.whl

Download URL sadisplay-0.4.9-py2.py3-none-any.whl
Size 9.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
bf456f582b8f5da19fedef7a9afe969b49231d79724710bc7d35c9439f44c2fc
BLAKE2b-256 checksum
How to use checksums
6519fbce187a8e88cffd6f35f928a07eab2d43d8d0747002c68976530ccf87a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for sadisplay 0.4.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page