Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qweeze/pg_diagram
A tool to convert postgresql schema to ER diagram
https://github.com/qweeze/pg_diagram
entity-relation postgres postgresql python
Last synced: 2 months ago
JSON representation
A tool to convert postgresql schema to ER diagram
- Host: GitHub
- URL: https://github.com/qweeze/pg_diagram
- Owner: qweeze
- License: mit
- Created: 2019-07-22T20:26:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T03:14:28.000Z (almost 2 years ago)
- Last Synced: 2024-08-15T22:34:09.814Z (3 months ago)
- Topics: entity-relation, postgres, postgresql, python
- Language: Python
- Size: 146 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## pg_diagram
[![PyPI version](https://badge.fury.io/py/pg-diagram.svg)](https://badge.fury.io/py/pg-diagram)
A tool for creating [Entity-relationship diagrams](https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model) for PostgreSQL
### Installation
- install [Graphviz](https://graphviz.org)
-
```bash
pip install pg-diagram
```
### Usage
```bash
pg_diagram --format svg -o diagram.svg schema.sql
```
```bash
# or feed output of pg_dump
pg_dump --schema-only mydb | pg_diagram -o mydb.png -
```### Sample output