--- id: syntaqlite version: "0.7.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # syntaqlite — SQLite SQL tools — parser, formatter, validator, and MCP server License: permissive · Maintenance: active · Downloads: 367.9K/mo ## What it is and what it does Syntaqlite is a Python library that parses, formats, validates, and tokenizes SQLite SQL using SQLite's own grammar and tokenizer—not an approximation, but the actual SQLite parser. It provides a typed AST with IDE autocomplete, a formatter that normalizes SQL structure, a tokenizer that breaks queries into categorized tokens, and schema-aware analysis that catches unknown tables, columns, and function mismatches without touching a database. It also computes column lineage to trace where output columns originate from source tables. The library is built around a reusable `Syntaqlite` instance and exposes both typed Python objects (for safety and IDE support) and raw dict output (for performance). It includes a CLI tool for formatting, parsing, and validating SQL files, with support for pinning to specific SQLite versions and enabling compile-time flags. Zero runtime dependencies and wheels for Linux, macOS, Windows, and WebAssembly. Use it for: - Format and normalize SQL queries in applications or CI pipelines to enforce consistent style without a database. - Validate user-submitted SQL against a schema to catch typos and unknown columns before execution. - Build linters or IDE plugins that need accurate SQLite syntax understanding and error reporting. - Extract column lineage from SELECT queries to understand data provenance in ETL or analytics systems. - Tokenize and analyze SQL for query optimization, cost estimation, or security scanning. - Embed SQL parsing in tools that generate or transform SQLite queries programmatically. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parse, format, validate, and tokenize SQLite SQL using SQLite's own grammar and tokenizer, with full AST support and schema-aware analysis including column lineage. Yes. Syntaqlite is actively maintained, has no runtime dependencies, offers permissive licensing, and solves a real problem—accurate SQLite SQL parsing without approximations. The medium install friction (compiled wheels) is standard for performance-critical libraries. Install if you need to parse, validate, or analyze SQLite SQL in Python; skip if you only execute queries against a live database. ## Install pip install syntaqlite uv add syntaqlite poetry add syntaqlite ## Installing syntaqlite Before you install: Medium install friction due to compiled wheels for multiple platforms (Linux x86_64/aarch64, macOS x86_64/arm64, Windows x86_64, WebAssembly). Active maintenance with recent releases; last commit 2026-07-08. License in practice: Apache-2.0 permissive license allows commercial and private use with attribution; SQLite components are public domain under the SQLite blessing. Quickstart: import syntaqlite with syntaqlite.Syntaqlite() as sq: formatted = sq.format_sql("select 1") stmts = sq.parse("SELECT 1 + 2 FROM foo") tokens = list(sq.tokenize("SELECT 1")) Requires Python 3.10 or later. Verify before relying: - Whether the AST node types and enums remain stable across minor version updates. - Performance characteristics of parse_raw() vs typed parsing for large SQL batches. - Whether schema analysis supports all SQLite pragmas and compile-time flags. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 367.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sqlite sql parser, sql formatter, sql validation, sql ast, sqlite query analysis, sql tokenizer, schema validation, sql-parsing, sqlite, schema-validation [View on SkillFed](https://skillfed.io/packages/syntaqlite) · [View on PyPI](https://pypi.org/project/syntaqlite/)