--- id: sqlglotc version: "30.17.0" license: MIT license_treatment: permissive maintenance: active --- # sqlglotc — mypyc-compiled extensions for sqlglot License: permissive · Maintenance: active · Downloads: 2.1M/mo ## What it is and what it does sqlglotc bundles mypyc-optimized C extensions to accelerate SQL parsing and manipulation through sqlglot. It wraps sqlglot and trades pure-Python portability for speed, delivering roughly 3-5x faster execution on parsing, transpilation, and analysis tasks. The package is designed as a drop-in replacement: install it instead of the base package, and operations run faster without code changes. The underlying sqlglot library handles SQL parsing across over 30 dialects (DuckDB, Presto, Spark, Snowflake, BigQuery, and others), transpilation between them, query optimization, and syntax error detection. sqlglotc simply accelerates these operations by compiling hot paths to native code. It depends on sqlglot as its runtime dependency and is most useful when parsing or transpiling large volumes of SQL or running in performance-sensitive applications. Use it for: - Accelerate batch SQL transpilation pipelines that convert queries between multiple database dialects. - Speed up query analysis and metadata extraction (finding columns, tables, and dependencies) in large codebases. - Reduce latency in real-time SQL formatting or validation services that handle many requests per second. - Optimize data warehouse migration tools that parse and rewrite SQL at scale. - Improve performance of SQL linting or code-review tools that analyze many queries in sequence. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides mypyc-compiled C extensions that accelerate sqlglot's SQL parsing, transpilation, and analysis operations by roughly 3-5x compared to the pure Python version. Yes, if you use sqlglot and performance matters. The compiled extensions are a strict speedup with no API changes—install sqlglotc and operations run 3-5x faster. The trade-off is medium install friction (compiled wheels for common platforms, but source builds elsewhere) and a requirement for Python 3.10 or later. No known vulnerabilities and actively maintained. Skip it only if you need custom dialects or are on an unsupported platform where source compilation is impractical. ## Install pip install sqlglotc uv add sqlglotc poetry add sqlglotc ## Installing sqlglotc Before you install: Medium install friction due to compiled wheels; prebuilt binaries are available for Python 3.10–3.14 on macOS, Linux (x86_64 and aarch64), and Windows, but source builds may be required on unsupported platforms. Package is actively maintained with releases every few days. License in practice: MIT license permits commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install "sqlglotc[c]" import sqlglot result = sqlglot.transpile("SELECT * FROM table", read="postgres", write="duckdb")[0] Requires Python 3.10 or later; source builds on unsupported platforms may require a C compiler and mypyc toolchain. Verify before relying: - Whether custom dialects work correctly with the compiled extensions (documentation notes potential incompatibility). - Exact performance improvement margin on real-world workloads beyond the stated 3-5x benchmark range. - Whether the [c] extra is available for sqlglotc or if compilation is automatic. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 2.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags sqlglot c extensions, fast sql parser, compiled sqlglot, sql transpiler performance, mypyc compiled sql, sql dialect translation, optimized sql parsing, sql-parsing, performance-optimization, compiled-extension [View on SkillFed](https://skillfed.io/packages/sqlglotc) · [View on PyPI](https://pypi.org/project/sqlglotc/)