Install & Compatibility
Where this runs
tested against v0.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.062s · 18.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.054s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
diff
✓ from sql_compare import diff
✗ from sqlcompare import diff
Package uses underscore in module name.
diff_files
✓ from sql_compare import diff_files
✗ from sql_compare.diff import diff_files
Functions are at package level, not submodule.
Basic usage: compare two SQL schema strings and print the diff.
from sql_compare import diff
schema1 = "CREATE TABLE users (id INT, name TEXT);"
schema2 = "CREATE TABLE users (id INT, name VARCHAR(255));"
print(diff(schema1, schema2))
sql-compare --version
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'sql_compare'
The package is installed as 'sql-compare' but import uses underscore.
fixInstall with `pip install sql-compare` and import with `from sql_compare import diff`.
AttributeError: module 'sql_compare' has no attribute 'get_diff'
Function renamed or removed in newer version.
fixUse `diff()` or `diff_files()` instead of `get_diff()`.
TypeError: expected str, bytes or os.PathLike object, not _io.TextIOWrapper
Passed a file object to `diff_files()` instead of a file path.
fixPass a string file path: `diff_files('file1.sql', 'file2.sql')`. Upgrade
Version history
0.2.0latest on PyPI · released Feb 12, 2026
Audit
Dependencies
No dependency data recorded yet.