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.1.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.1-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: liquisketch-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 790578c11bb53e25af7f8f878eeab3110b8d81196361855e69ee8b0fa5998c72
MD5 7d1080b5cd0de26d768c2efc26b134ad
BLAKE2b-256 af1729821dd2f5a816a3957fb28d59ef3ce9d6b9439d5c30f22405b9c747c56b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: liquisketch-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a86de3cf1211bd0cfb6aabc868c961f45385065dbfef595bb6a389792d820e4f
MD5 2a648fca14d087ac9e57958f701b3346
BLAKE2b-256 14e2c707e69cae08ef4f44ed7700bfbec18ef3cfdcf8a28a8ae5fad393943ed0

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