Python liquibase
Project description
pyliquibase
Use liquibase with python. Java integration is done using Java Native Interface (JNI) using pyjnius
MySQL, Postgresql, Bigquery, Redshift JDBC Drivers included.
Installation
pip install https://github.com/memiiso/pyliquibase/archive/master.zip --upgrade --user
Example
from pyliquibase import Pyliquibase
if __name__ == '__main__':
liquibase = Pyliquibase(defaultsFile="resources/liquibase.properties", logLevel="INFO")
# call execute with arguments
liquibase.execute("status")
liquibase.execute("rollback", "MyTag")
# or
liquibase.validate()
liquibase.status()
liquibase.updateSQL()
liquibase.update()
liquibase.rollback("MyTag")
Python Java Integration
Python library is using LiquibaseCommandLine
reflection class which uses/equivalent LiquibaseCommandLine
java class.
liquibase calls are executed by LiquibaseCommandLine.execute(liquibaseargs)
method by passing given python arguments to java class.
python java integration class using pyjnius(using the Java Native Interface (JNI))
class LiquibaseCommandLine(JavaClass, metaclass=MetaJavaClass):
__javaclass__ = 'liquibase/integration/commandline/LiquibaseCommandLine'
# methods
execute = JavaMethod('([Ljava/lang/String;)I')
LIQUIBASE is a registered trademark of Liquibase , INC.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyliquibase-2.0.4.tar.gz
(57.3 MB
view hashes)
Built Distribution
Close
Hashes for pyliquibase-2.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f437003723d0b936165135456a6845f642b437cfae78ab9b700d036b6449238 |
|
MD5 | 92d777f7fbfecebdd8ecdf738950aea6 |
|
BLAKE2b-256 | b0c25328acdeebf9eb409e018471311b6a53e6d12383f9b280cb0466b8841ed6 |