/pyliquibase

Python wrapper for liquibase.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

pyliquibase

Python wrapper for liquibase. Liquibase version : 3.8.4

Installation

pip install https://github.com/memiiso/pyliquibase/archive/master.zip --upgrade --user

Usage

MySQL and Postgresql JDBC Drivers included.

MySQL
from pyliquibase import Pyliquibase
if __name__ == '__main__':
    liquibase = Pyliquibase(
                    url="jdbc:mysql://localhost:3306/sakila",
                    driver="com.mysql.jdbc.Driver",
                    username="root",
                    password="root",
                    changeLogFile="/mydir/changelog.xml",
                    logLevel="info",
                    classpath="/myjdbcdriver/xyzdatabase_jdbc_driver.jar"
                )
    liquibase.validate()
    liquibase.status()
    liquibase.updateSQL()
    liquibase.update()