{"id":20008086,"url":"https://github.com/memiiso/pyliquibase","last_synced_at":"2025-04-04T08:06:47.738Z","repository":{"id":38027943,"uuid":"231792102","full_name":"memiiso/pyliquibase","owner":"memiiso","description":"Use liquibase java application within python","archived":false,"fork":false,"pushed_at":"2025-02-21T10:57:14.000Z","size":199630,"stargazers_count":50,"open_issues_count":5,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T07:06:53.583Z","etag":null,"topics":["continuous-deployment","database-change-management-tool","database-management","database-migrations","liquibase","postgresql","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memiiso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-04T16:15:27.000Z","updated_at":"2025-02-21T10:57:18.000Z","dependencies_parsed_at":"2024-08-06T15:44:03.973Z","dependency_job_id":"2ff176c7-069c-4092-8485-3b2a7d854d9b","html_url":"https://github.com/memiiso/pyliquibase","commit_stats":{"total_commits":94,"total_committers":13,"mean_commits":7.230769230769231,"dds":0.6702127659574468,"last_synced_commit":"e7d257531e0ac49d245fee9b86fcc09aec9a532d"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memiiso%2Fpyliquibase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memiiso%2Fpyliquibase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memiiso%2Fpyliquibase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memiiso%2Fpyliquibase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memiiso","download_url":"https://codeload.github.com/memiiso/pyliquibase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142063,"owners_count":20890652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["continuous-deployment","database-change-management-tool","database-management","database-migrations","liquibase","postgresql","python"],"created_at":"2024-11-13T07:08:23.811Z","updated_at":"2025-04-04T08:06:47.709Z","avatar_url":"https://github.com/memiiso.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](http://img.shields.io/:license-apache%202.0-brightgreen.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)\n[![Create Pypi Release](https://github.com/memiiso/pyliquibase/actions/workflows/release.yml/badge.svg)](https://github.com/memiiso/pyliquibase/actions/workflows/release.yml)\n# pyliquibase\n\nA Python module to use [liquibase](http://www.liquibase.org/) in python, using the Java Native Interface (JNI).\n\nFor further details on python-java integration [please see here](#python-java-integration)\n\n## Installation\nPython-Java integration requires a Java Development Kit (JDK). Ensure a JDK is installed on your operating system.\n\ninstall:\n```shell\npip install pyliquibase\n```\n\n## How to Use\n\nusing command line:\n```shell\npyliquibase --defaultsFile=changelogs/liquibase.properties status\npyliquibase --defaultsFile=changelogs/liquibase.properties validate\npyliquibase --defaultsFile=changelogs/liquibase.properties updateSQL\npyliquibase --defaultsFile=changelogs/liquibase.properties update\n```\n\nusing python:\n```python\nfrom pyliquibase import Pyliquibase\n\nif __name__ == '__main__':\n    liquibase = Pyliquibase(defaultsFile=\"changelogs/liquibase.properties\", logLevel=\"INFO\")\n    # call execute with arguments\n    liquibase.execute(\"status\")\n    liquibase.execute(\"rollback\", \"MyTag\")\n    # or \n    liquibase.validate()\n    liquibase.status()\n    liquibase.updateSQL()\n    liquibase.update()\n    liquibase.update_to_tag(\"MyTag\")\n    liquibase.rollback(\"MyTag\")\n    # liquibase maintenance commands\n    liquibase.changelog_sync()\n    liquibase.changelog_sync_to_tag(\"MyTag\")\n    liquibase.clear_checksums()\n    liquibase.release_locks()\n```\n\n## Python Java Integration\n\nThis 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.\n\nThis integration leverages [Pyjnius](https://github.com/kivy/pyjnius), a Python library for accessing Java classes. Pyjnius either starts a new Java Virtual Machine (JVM) within the current process or connects to an existing JVM.  For more information on Pyjnius, please refer to their documentation: https://pyjnius.readthedocs.io/en/latest/.\n\n```python\nclass LiquibaseCommandLine(JavaClass, metaclass=MetaJavaClass):\n    __javaclass__ = 'liquibase/integration/commandline/LiquibaseCommandLine'\n    # methods\n    execute = JavaMethod('([Ljava/lang/String;)I')\n```\n\n### Contributors\n\u003ca href=\"https://github.com/memiiso/pyliquibase/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contributors-img.web.app/image?repo=memiiso/pyliquibase\" /\u003e\n\u003c/a\u003e\n\n\n##\nLIQUIBASE is a registered trademark of [Liquibase](https://www.liquibase.com) , INC.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemiiso%2Fpyliquibase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemiiso%2Fpyliquibase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemiiso%2Fpyliquibase/lists"}