Registry / data / acryl-sqlglot

acryl-sqlglot

JSON →
library25.25.2.dev9pypypiunverified

SQLGlot is a no-dependency SQL parser, transpiler, and optimizer written in Python. It can parse a wide variety of SQL dialects, transpile between them, and produce formatted SQL. Current version is 25.25.2.dev9 (development release; stable releases follow semantic versioning and are frequent).

pip install acryl-sqlglot
INSTALL
IMPORT
SIG · ACRYL-SQLGLOT
A
acryl-sqlglot
datapythonv25.25.2.dev9
Install
2.0s avg
Import
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v25.25.2.dev9 · 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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 21.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.0s · import 0.000s · 22MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse_one
from sqlglot import parse_one
from sqlglot import parse_one

Parse SQL, transpile between dialects, and format.

import sqlglot # Parse and transpile SQL result = sqlglot.transpile("SELECT * FROM table", read='mysql', write='postgres') print(result[0]) # Output: SELECT * FROM "table" # Pretty print pretty = sqlglot.transpile("SELECT a,b FROM foo", pretty=True) print(pretty[0])
Debug
Known issues
gotchaImport from 'sqlglot', NOT 'acryl_sqlglot'. The PyPI package is 'acryl-sqlglot' but the Python module is 'sqlglot'.
fix
Use 'import sqlglot' or 'from sqlglot import ...'.
affects: all
breakingIn older versions (pre-10.0), the dialect API was different. The 'dialect' argument in parse_one was replaced with explicit dialect classes.
fix
Use dialect classes like sqlglot.dialects.mysql.MySQL.
affects: <10.0
Upgrade
Version history
25.25.2.dev9latest on PyPI · released Oct 16, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
65 hits · last 30 days
node
44
OpenAI (training)
1
Resources
acryl-sqlglot — pip install acryl-sqlglot · libregistry