Skip to main content

Create Database Entity Relationship Diagrams

Project description

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.

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

db_diagram-0.0.1.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

db_diagram-0.0.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file db_diagram-0.0.1.tar.gz.

File metadata

  • Download URL: db_diagram-0.0.1.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.2 cpython/3.12.3 HTTPX/0.28.1

File hashes

Hashes for db_diagram-0.0.1.tar.gz
Algorithm Hash digest
SHA256 97bd05c27ba475c05d80bcc81c5035fc187bf1b90b88a95477d28858126fca94
MD5 b6856988678dde59298404624b3dcf40
BLAKE2b-256 e67cf01d2754c567cc258880ba768b388e7955f2db44fdfac300e1ca3a551a95

See more details on using hashes here.

File details

Details for the file db_diagram-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: db_diagram-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.2 cpython/3.12.3 HTTPX/0.28.1

File hashes

Hashes for db_diagram-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e23da3251ed9103518e510ff86440c2a95ff84568fb3e93c67b0eca699a6a44
MD5 44362b2374029c3853d9302ee21fb4fc
BLAKE2b-256 c41586a0056ddb256d05fd1d86e44ccce57e0c9789ed281ec2f6ec4cf5b4fd2d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page