- Reference
- Version · 5.2.2
- Reference guide
--checks-scripts-python-path
Last updated: August 25, 2026
Adds directories to the Python import path so custom policy check scripts can import shared utility modules. The directory holding the script is added automatically. Available in Liquibase Secure 5.2.0 and later.
How the import path is built
Custom policy check scripts run in an embedded Python environment that replaces the host filesystem, so a script cannot import a helper module by default. Setting --checks-scripts-python-path grants read-only access to the directories you name and adds them to the import path.
Liquibase builds the import path in this order:
The Python modules embedded in Liquibase.
The directories you pass to
--checks-scripts-python-path, in the order you list them.The directory holding the check script itself.
Because the script's own directory is always added, a check script can import from a sibling .py file with no configuration. Set the parameter only when the shared module lives somewhere else.
Note: Embedded modules are matched first, so a shared module whose name collides with one of Liquibase's own modules is never imported. Rename the shared module if you need it.
Example
Both directories are searched for imported modules, and relative paths are resolved to absolute paths for you:
liquibase checks run --checks-scripts-python-path=/opt/shared/utils:/opt/shared/db
Separate multiple directories with the path separator for your operating system, which is : on Linux and macOS and ; on Windows.
If a script imports a module Liquibase cannot resolve, the run reports that the changesets were not run because the script has errors, and names the missing module and line in a ModuleNotFoundError. Nothing is skipped silently.
Syntax
You can set this parameter in the following ways:
Option | Syntax |
Command CLI parameter |
|
Liquibase properties file (defaults file) |
|
Command flow file argument (example) |
|
JVM system property (JAVA_OPTS environment variable) |
|
Liquibase environment variable |
|