Sphinx SQLAlchemyViz extension
Project description
This file provides a Sphinx extension to include an Entity-Relationship diagram of SQLAlchemy metadata, generated by the SQLAlchemyViz package. This is a highly unpolished extension which does almost no heavy lifting, and not portable across platforms. The SQLALchemyVix package converts the SQLAlchemy metadata object into a dot file. The extension then uses POSIX/Linux tools via python’s subprocess mechanisms to improve the layout of the graph.
To achieve the same effect directly from the shell, the relevant commands would be :
sqlaviz --unique-relations --show-constraints <pkg.module:metadata> -f out.dot
ccomps -x out.dot | dot | gvpack -array3 | neato -Tpng -n2 -o out.png
Installation & Usage
This extension can be installed from pypi :
pip install sphinxcontrib-sqlalchemyviz
In the .rst file where the table should appear, insert the Sphinx directive provided by this module :
.. .. sqlaviz:: :metadataobject: full.importable.path.of.metadata
For a basic usage example, see:
License
This Sphinx Extension is made available under the BSD 2-clause License. See the LICENSE file for the full text.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sphinxcontrib-sqlalchemyviz-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c62a11810f40aa17b0d7119c59e036fa2f602d0e18375b77b044722d1e8cec87 |
|
MD5 | b159d43b3f9bb2b9fd51ff7bd8903fec |
|
BLAKE2b-256 | 29a4f96e605c8c11b8374a2f52a1e0ec6e4db8ba23e54eaaa81101e873a22ec9 |
Hashes for sphinxcontrib_sqlalchemyviz-0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeee5d2ec3ac6daebc36a0f89371562bbd2385356631d4c7242f9a93bc13a666 |
|
MD5 | f7b439be07f394fa40b4b0beec3655ea |
|
BLAKE2b-256 | dc4dc4210c059aae1adc644e94eff3be91134a9dd681b5128cd859df6be3f43a |