Skip to main content

db-diagram

test PyPI version

This package provides a CLI and library for generating Mermaid Entity Relationship Diagrams based on an existing database connection URL and/or SQLAlchemy metadata.

ab_group_role.mmd.svg

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)

Source distribution for db-diagram 0.0.1
File Size Uploaded
db_diagram-0.0.1.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for db-diagram 0.0.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

0.0.0

2 release files

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