Skip to main content

Liquibase in, diagrams out. Sketch your schema from your changelog.

Project description

LiquiSketch

Liquibase in, diagrams out - sketch your schema straight from your changelog.

LiquiSketch is a Python utility that reads Liquibase changelogs and produces schema diagrams to help teams understand structure, relationships, and change history.

Why LiquiSketch

  • Keep schema docs aligned with migration history
  • Reduce manual diagram maintenance
  • Improve onboarding and design reviews
  • Catch schema drift earlier

Quick Start (development)

From a clone of this repository:

pip install -e ".[dev]"
make check

Installation

From PyPI

Install the published package (requires Python 3.11+):

pip install liquisketch

This installs the liquisketch package and the liquisketch console script (see Command line).

From the GitHub repository

Install the latest default branch without cloning:

pip install "git+https://github.com/starforge-universe/liquisketch.git"

Pin a tag or branch:

pip install "git+https://github.com/starforge-universe/liquisketch.git@v1.0.1"
pip install "git+https://github.com/starforge-universe/liquisketch.git@main"

Editable install from a local clone

For development, install in editable mode from the repo root:

git clone https://github.com/starforge-universe/liquisketch.git
cd liquisketch
pip install -e ".[dev]"

Usage

Command line

After installation, run liquisketch with two positional arguments:

  1. CHANGELOG — path to your Liquibase master changelog XML (for example changelog-master.xml).
  2. OUTPUT — path where the Draw.io diagram should be written (for example schema.drawio).
liquisketch path/to/changelog-master.xml path/to/output.drawio

Verbose logging (Liquibase parsing and Draw.io sync details):

liquisketch -v path/to/changelog-master.xml path/to/output.drawio

You can also invoke the package as a module (same arguments):

python -m liquisketch path/to/changelog-master.xml path/to/output.drawio

Show help:

liquisketch --help

Example with the repository test fixture

liquisketch tests/db/changelog-master.xml tests/db/schema.drawio

Synchronization behavior

  • Creates the output file when it does not exist.
  • Synchronizes tables, columns, and foreign keys with the changelog-derived schema.
  • Removes diagram elements that no longer exist in schema.
  • Keeps the original diagram format when updating an existing file:
    • compressed stays compressed
    • uncompressed stays uncompressed
  • New files are written as uncompressed Draw.io XML.

Python API

from pathlib import Path

from liquisketch.drawio import sync_schema_to_drawio
from liquisketch.liquibase import load_database_schema_from_master_changelog

schema = load_database_schema_from_master_changelog(Path("tests/db/changelog-master.xml"))
sync_schema_to_drawio(Path("tests/db/schema.drawio"), schema)

Project Layout

liquisketch/
├── liquisketch/        # Package source
├── tests/              # Test suite
├── pyproject.toml      # Packaging and tooling configuration
├── Makefile            # Development commands
├── CONTRIBUTING.md     # Contributor workflow
└── README.md           # Project overview

Contributing

See CONTRIBUTING.md for setup, workflow, and PR expectations.

License

This project is licensed under LICENSE.

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

liquisketch-0.1.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

liquisketch-0.1.0-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file liquisketch-0.1.0.tar.gz.

File metadata

  • Download URL: liquisketch-0.1.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for liquisketch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5e5d0115092c092e3d8a14e0a5bbc6f7fa9a272f5fe81487144364c7c53d8998
MD5 76ff78d4a5e24e963b297e53fc56486e
BLAKE2b-256 2443c510e18bd53dd1d1a4bd559eb88d659a4e1fdeb64b1b1bcf48aaa77e497b

See more details on using hashes here.

File details

Details for the file liquisketch-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: liquisketch-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for liquisketch-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1ab857e7891be5b29e7f95f7ed3023a1ae9a93a54109082e939a09b8d95952b
MD5 7c8586dbcbcb84f8eb68b348fce4c405
BLAKE2b-256 23468b55de28ffb67f4aedc9d1c3121efd2e2a2664d8bcbee0afb0475c7af140

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