pyliquibase
A Python module to use liquibase in python, using the Java Native Interface (JNI).
For full documentation, please visit https://memiiso.github.io/pyliquibase/
Installation
Python-Java integration requires Java. Ensure Java is installed on your operating system.
pip install pyliquibase
Quick Start
using command line:
pyliquibase --defaultsFile=changelogs/liquibase.properties status
pyliquibase --defaultsFile=changelogs/liquibase.properties validate
pyliquibase --defaultsFile=changelogs/liquibase.properties updateSQL
pyliquibase --defaultsFile=changelogs/liquibase.properties update
using python:
from pyliquibase import Pyliquibase
if __name__ == '__main__':
liquibase = Pyliquibase(defaultsFile="changelogs/liquibase.properties")
# optionally, you can add log-level or other liquibase arguments:
# liquibase.addarg("--log-level", "info")
# call execute with arguments
liquibase.execute("status")
liquibase.execute("rollback", "MyTag")
# or
liquibase.validate()
liquibase.status()
liquibase.updateSQL()
liquibase.update()
liquibase.update_to_tag("MyTag")
liquibase.rollback("MyTag")
# liquibase maintenance commands
liquibase.changelog_sync()
liquibase.changelog_sync_to_tag("MyTag")
liquibase.clear_checksums()
liquibase.release_locks()
Python Java Integration
This Python library integrates with Java using the LiquibaseCommandLine class. Our Python LiquibaseCommandLine class acts as a reflection of the Java counterpart, passing Liquibase calls to the Java LiquibaseCommandLine.execute(liquibaseargs) method.
This integration leverages JPype1, a Python library for accessing Java classes. JPype starts a Java Virtual Machine (JVM) within the current process or connects to an existing JVM. For more information on JPype, please refer to their documentation: https://jpype.readthedocs.io/en/latest/.
import jpype
# ... setup classpath ...
jpype.startJVM(classpath=LIQUIBASE_CLASSPATH, convertStrings=True)
liquibase_cli = jpype.JClass("liquibase.integration.commandline.LiquibaseCommandLine")()
liquibase_cli.execute(args)
Contributors
LIQUIBASE is a registered trademark of Liquibase , INC.
Metadata
Release files for pyliquibase 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyliquibase-3.1.0.tar.gz | 10.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyliquibase-3.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.5 kB
Release files / pyliquibase-3.1.0.tar.gz
| Download URL | pyliquibase-3.1.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5085109c8c7ac72cd6492b0d3c3dd5f63f131bbb72e48fc37e636d4165aae70
|
|
BLAKE2b-256 checksum How to use checksums |
8975f3510e043676516cae0c88653cb73c8c1293bf9ebb924ba561aeabf0a940
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency logRelease files / pyliquibase-3.1.0-py3-none-any.whl
| Download URL | pyliquibase-3.1.0-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e77628949883cd1d91f9a1fb03e2c15e654341ab7c2b9605a9d00b9f18bfc10
|
|
BLAKE2b-256 checksum How to use checksums |
1ffc76a9416f1c91cc099446fa42ef780a5a321cc53fd9af9a02bd83efb16b3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency log