https://github.com/abitrolly/sqlite2png
Draw a diagram of a SQLite database
https://github.com/abitrolly/sqlite2png
dataase diagram erd
Last synced: 19 days ago
JSON representation
Draw a diagram of a SQLite database
- Host: GitHub
- URL: https://github.com/abitrolly/sqlite2png
- Owner: abitrolly
- License: unlicense
- Created: 2022-03-26T17:46:47.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-26T16:55:00.000Z (over 2 years ago)
- Last Synced: 2025-03-14T10:39:01.590Z (about 1 month ago)
- Topics: dataase, diagram, erd
- Language: Python
- Homepage:
- Size: 101 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.sqlalchemy_schemadisplay
Awesome Lists containing this project
README
`sqlite2png` tool generates .png image of database schema.
[](https://pypi.org/project/sqlite2png/)
### Usage
From checkout without installing (needs `sqlalchemy` and `pydot`).
```bash
./sqlite2png.py sqlite.db
```
The diagram is written into `db.png`.Install with pip and run as module.
```bash
pip install sqlite2png
sqlite2png /usr/share/ibus-libpinyin/db/english.db
```
```
sqlite:////usr/share/ibus-libpinyin/db/english.db
writing db.png
```
### About and examples
`sqlite2png` is a CLI wrapper over
[`sqlalchemy_schemadisplay`](https://github.com/fschulze/sqlalchemy_schemadisplay)
lib by Florian Schulze, which uses `SQLAlchemy`, `pydot` and `graphviz`
under the hood. `Graphviz-cairo` is also recommended to improve image quality.See [./examples](./examples).
### Roadmap / Changelog
* [ ] de-vendorize `sqlalchemy_schemadisplay` after it is released
* [ ] output .png to stdout
* [ ] option to show the image (needs PIL and image viewer)
* [ ] option to diff the image
* [ ] support full urls
```
{py} postgres://user:pwd@host/database
{py} sqlite:////usr/share/my.db
```
* [x] (1.1.4) install command line script with `pip`
* [x] (1.1.4) add example DB to the repo (uses some public DBs)
* [x] reproducuble .png (seems like it already is)