andialbrecht/sqlparse
A non-validating SQL parser module for Python observed · 2026-10-07
Health v2 · maintenance only
72/100
- Activity 89
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 5298
- days_rel: n/a
- days_push: 68
- n_releases_24m: 0
Adoption not part of the score
4020 stars · 764 forks observed · 2026-10-07
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
sqlparse is a non-validating SQL parser library for Python that tokenizes SQL text, splits scripts into statements, formats them, and exposes a traversable token tree. It makes no dialect assumptions, so vendor extensions and templated SQL parse fine, and it also ships a sqlformat command-line tool.
Use cases
- parse SQL statements in Python
- format and pretty-print SQL queries
- split a SQL script into individual statements
- build a SQL linter or query analyzer
- reformat SQL files from the command line
- inspect the token structure of a SQL query
When to choose
- you need to parse, split, or reformat SQL without strict validation
- you work with mixed or non-standard SQL dialects and templated SQL
- you're building tooling like formatters, linters, or editors on top of SQL text
When to avoid
- you need full SQL validation or a complete syntax/semantic parse tree
- you need to execute queries or need a database driver
- you need dialect-specific ASTs with exact grammar rules
Facets
library · maturity stable
parser formatter cli parsers databases developer-tools python cli cross-platform sql tokenizer sql-formatter non-validating-parser
2 sources
- readme: https://github.com/andialbrecht/sqlparse · fetched 2026-10-07 · 93b49844a216
- registry_pypi: https://pypi.org/pypi/sqlparse/json · fetched 2026-08-29 · ad683f985bbe
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| andialbrecht/sqlparse | main | 72 |
For agents
markdown · JSON · MCP: product_card(name="andialbrecht/sqlparse")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem