sqlglotrs
Deprecated: use sqlglotc instead
Decision gist · record as of 2026-08-14
Yes, if you need to parse or translate SQL across multiple dialects. The package is actively maintained, has no runtime dependencies, and offers both pure Python and faster mypyc-compiled variants. However, the package summary marks it as deprecated in favor of sqlglotc—verify whether that migration is necessary for your use case before committing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later; custom dialects may not work properly with the mypyc-compiled variant and may require the pure Python version.
- Installation is straightforward with low friction—a pure Python wheel with no runtime dependencies.
- The package is actively maintained; a mypyc-compiled variant is available for roughly 3-5x faster performance if needed.
License · maintenance · safety
MIT (permissive) — Licensed under MIT (permissive), so you can use, modify, and distribute it freely in both open-source and commercial projects without restriction.
last release 2026-02-23 (172 days) · last repo commit 2026-08-14 · 9,529 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,900,289 downloads/mo, #2,206 on PyPI
Alternatives
Verify before relying
pip install sqlglotrs
import sqlglotrs
result = sqlglotrs.transpile("SELECT EPOCH_MS(1618088028295)", read="duckdb", write="hive")[0]
print(result)- Whether sqlglotrs is actively maintained separately or if users should migrate to sqlglotc as indicated in the summary.
- Performance characteristics of the mypyc-compiled variant on different platforms.
- Completeness of dialect support for less common SQL dialects or edge cases in real-world queries.
What it is and what it does
sqlglotrs is a SQL parser and transpiler that reads SQL in one dialect and outputs it in another, supporting over 30 database and query engine dialects. It parses SQL into an abstract syntax tree (AST), allowing you to analyze queries, extract metadata, detect syntax errors, and programmatically build or modify SQL. The package is written entirely in Python with no external dependencies, making it easy to integrate into any application.
Common use cases include translating queries between incompatible SQL dialects, formatting and normalizing SQL for consistency, and analyzing query structure. It can handle identifier delimiters and data type translation across dialects. The parser is intentionally lenient to accept a wide variety of SQL inputs, though it prioritizes semantic correctness over preserving cosmetic details like original formatting or casing.
Use it for
- Translate SQL queries between incompatible dialects for cross-platform compatibility.
- Format and normalize SQL code for consistency and readability across a codebase.
- Extract metadata from queries—find all columns, tables, and functions referenced in a SQL statement.
- Detect and report SQL syntax errors such as unbalanced parentheses or incorrect keyword usage.
- Build or modify SQL queries programmatically by constructing and manipulating the AST.
- Optimize SQL queries by analyzing and rewriting expressions for better performance.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to parse or translate SQL across multiple dialects.
The package is actively maintained, has no runtime dependencies, and offers both pure Python and faster mypyc-compiled variants. However, the package summary marks it as deprecated in favor of sqlglotc—verify whether that migration is necessary for your use case before committing.
Install
sqlglotrs on PyPI
Before you install
Installation is straightforward with low friction—a pure Python wheel with no runtime dependencies. The package is actively maintained; a mypyc-compiled variant is available for roughly 3-5x faster performance if needed.
Requires Python 3.9 or later; custom dialects may not work properly with the mypyc-compiled variant and may require the pure Python version.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute it freely in both open-source and commercial projects without restriction.
Quickstart
pip install sqlglotrs
import sqlglotrs
result = sqlglotrs.transpile("SELECT EPOCH_MS(1618088028295)", read="duckdb", write="hive")[0]
print(result)
Verify before relying
- Whether sqlglotrs is actively maintained separately or if users should migrate to sqlglotc as indicated in the summary.
- Performance characteristics of the mypyc-compiled variant on different platforms.
- Completeness of dialect support for less common SQL dialects or edge cases in real-world queries.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 172 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,900,289 / month, #2,206 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: sqlglotrs-0.13.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sql parser transpiler”
- sqlglotrsA SQL parser, transpiler, and optimizer that converts SQL between…
- acryl-sqlglotParses, transpiles, and optimizes SQL across 23 different dialects…
- sqlglotSQLGlot parses, transpiles, optimizes, and analyzes SQL across over…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also acryl-sqlglot · sqlglot · sql-metadata · sqlglotc · fugue-sql-antlr · sqloxide · collate-sqlfluff · shandy-sqlfmt · sqlfluff · sqllineage