Install & Compatibility
Where this runs
tested against v0.13.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
186MB installed
● package 186MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
warnings
✓ from sqlglotrs import warnings
✗ from sqlglot import parse_one
This quickstart demonstrates basic parsing and transpilation using the core `sqlglot` library. While `sqlglotrs` provided a faster tokenizer, its functionality was exposed through `sqlglot`'s API. For current performance benefits, install `sqlglot` with the `[c]` extra.
from sqlglot import parse_one, exp
# Example using the core sqlglot library functionality
sql_query = "SELECT a, b FROM my_table WHERE a > 10"
expression_tree = parse_one(sql_query)
print(expression_tree.sql(dialect="mysql"))
# To get the performance benefits previously offered by sqlglotrs (now sqlglot[c]),
# ensure sqlglot is installed with the '[c]' extra: pip install "sqlglot[c]"
Debug
Known issues
breakingThe `sqlglotrs` package is deprecated and is no longer compatible with recent versions of `sqlglot`. Attempting to use `sqlglotrs` with modern `sqlglot` installations may lead to runtime errors or unexpected behavior.fixMigrate to using the `sqlglot[c]` extra for performance. Uninstall `sqlglotrs` and install `sqlglot` using `pip install "sqlglot[c]"`.
affects: All versions of `sqlglotrs` with `sqlglot` versions > 20.3.0 which introduced `sqlglot[c]` as a replacement.
deprecatedThe `sqlglotrs` library is officially deprecated. Its PyPI summary explicitly states: 'Deprecated: use sqlglotc instead.'fixNo new development or maintenance is expected. Users should transition to `sqlglot[c]` for continued performance benefits and compatibility with `sqlglot`.
affects: All versions (0.x.x)
gotchaUsers often confuse `sqlglot`, `sqlglotrs`, and `sqlglotc`. `sqlglot` is the main Python SQL parsing library. `sqlglotrs` was an optional Rust-backed tokenizer for `sqlglot`, now replaced by `sqlglotc`, which provides C extensions for performance. Direct imports of `sqlglotrs` were generally not the intended usage.fixFocus on the main `sqlglot` library and use `pip install "sqlglot[c]"` for enhanced performance. The performance benefits are integrated into `sqlglot` when the `[c]` extra is installed.
affects: All versions
Upgrade
Version history
0.13.0latest on PyPI · released Feb 23, 2026
Audit
Dependencies
sqlglotrequiredsqlglotrs was an optional tokenizer backend for the main sqlglot library.