db-diagram
This package provides a CLI and library for generating Mermaid Entity Relationship Diagrams based on an existing database connection URL and/or SQLAlchemy metadata.
Installation
You can install db-diagram with pip:
pip3 install db-diagram
You will also need to have libraries installed for the SQLAlchemy dialect corresponding to your database, unless you are using MySQL/MariaDB or SQLite. For convenience, installation extras are defined for a handful of dialects:
pip3 install 'db-diagram[postgresql]'pip3 install 'db-diagram[snowflake]'pip3 install 'db-diagram[databricks]'
Usage
You can utilize db-diagram as a
CLI (from a shell or command prompt),
or as a python library
(from db_diagram import write_markdown).
The CLI will be more convenient under most circumstances, however
if you want to generate diagrams from SQLAlchemy metadata
rather than
a connection URL, such as you might for a
SQLAlchemy ORM,
you will want to use db_diagram as a python library.
Pease refer to these examples
for reference concerning output.
Metadata
Release files for db-diagram 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| db_diagram-0.0.1.tar.gz | 13.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| db_diagram-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.4 kB
Release files / db_diagram-0.0.1.tar.gz
| Download URL | db_diagram-0.0.1.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97bd05c27ba475c05d80bcc81c5035fc187bf1b90b88a95477d28858126fca94
|
|
BLAKE2b-256 checksum How to use checksums |
e67cf01d2754c567cc258880ba768b388e7955f2db44fdfac300e1ca3a551a95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.2 cpython/3.12.3 HTTPX/0.28.1
|
Release files / db_diagram-0.0.1-py3-none-any.whl
| Download URL | db_diagram-0.0.1-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e23da3251ed9103518e510ff86440c2a95ff84568fb3e93c67b0eca699a6a44
|
|
BLAKE2b-256 checksum How to use checksums |
c41586a0056ddb256d05fd1d86e44ccce57e0c9789ed281ec2f6ec4cf5b4fd2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.2 cpython/3.12.3 HTTPX/0.28.1
|