Syntaqlite
raw JSON → 0.5.7 verified Sat May 09 auth: no python
A SQLite SQL toolkit providing parsing, formatting, validation, and an MCP server. Current version 0.5.7. Release cadence is active with frequent minor releases; breaking changes occur across minor versions (e.g., semantic renamed to analysis in 0.5.1).
pip install syntaqlite Common errors
error ModuleNotFoundError: No module named 'syntaqlite.semantic' ↓
cause The 'semantic' module was renamed to 'analysis' in v0.5.1.
fix
Use 'from syntaqlite.analysis import ...' or 'from syntaqlite import analyze'.
error AttributeError: module 'syntaqlite' has no attribute 'format_sql' ↓
cause format_sql is not available in very early versions (pre-0.1?), or the import is incorrect.
fix
Ensure you installed a recent version (>=0.4.0) and use 'from syntaqlite import format_sql'.
error GLIBC_2.39 not found ↓
cause Pre-built Linux CLI binaries from before v0.5.7 require a newer glibc than the host system.
fix
Upgrade to v0.5.7+ or install via pip (Python API) which bundles its own binaries.
Warnings
breaking In v0.5.1, the 'semantic' module was renamed to 'analysis'. Code using 'from syntaqlite.semantic import ...' will break. ↓
fix Replace 'semantic' with 'analysis' in imports, or use top-level functions 'analyze' directly.
gotcha The 'validate' subcommand was removed from the CLI in v0.5.1, causing release pipeline failures. The Python validate() function still exists. ↓
fix Use Python API validate() or CLI 'syntaqlite check' for validation.
gotcha Linux CLI binaries built before v0.5.7 may require glibc >= 2.39, causing 'GLIBC_2.39 not found' on older systems (e.g., RHEL 8, Ubuntu 20.04). ↓
fix Download v0.5.7+ binaries, or build from source if on older glibc.
Imports
- Engine
from syntaqlite import Engine - format_sql wrong
from syntaqlite.formatter import format_sqlcorrectfrom syntaqlite import format_sql - analyze wrong
from syntaqlite.semantic import analyzecorrectfrom syntaqlite import analyze - validate wrong
from syntaqlite.validator import validatecorrectfrom syntaqlite import validate
Quickstart
from syntaqlite import Engine, format_sql, analyze, validate
engine = Engine()
sql = "SELECT * FROM foo WHERE bar = 1"
parsed = engine.parse(sql)
print(parsed.statements)
formatted = format_sql(sql)
print(formatted)
issues = validate(sql)
print(issues)
analysis = analyze(sql)
print(analysis)