Comparison
pglast vs sql-formatter vs sqlparse
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
PostgreSQL Languages AST and statements prettifier
Actively maintained. Last release 6 days ago, commits in 16 of the last 26 weeks. A safe choice.
$
pip install pglastA SQL formatter
Likely abandoned. No release or commit for years (last release over 5 years ago).
$
pip install sql-formatterA non-validating SQL parser.
Maintained. Last release 4 weeks ago, commits in 7 of the last 26 weeks. Weaker on issue handling and contributor spread.
$
pip install sqlparseIn short
- sql-formatter looks abandoned: avoid it for new projects.
- sqlparse is the most used: 128.9M downloads a month, 11× more than pglast.
- pglast is better maintained: Pythie’s Index 87 against 62.
- pglast is growing fastest: downloads +22% over the last month.
- pglast is the newcomer: first released Jul 2026.
- Safe default for a new project: sqlparse, or pglast if active maintenance matters most.
Side by side
| Metric | pglast | sql-formatter | sqlparse |
|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 87 | Pythie’s Index: 9 | Pythie’s Index: 62 |
| Verdict | Actively maintained | Likely abandoned | Maintained |
| Downloads / month | 12M | 646.1K | 128.9M |
| Downloads, month over month | +22% | -1% | +7% |
| GitHub stars | 405 | 46 | 4K |
| Stars, last 7 days | – | – | – |
| Direct dependents | 0 | 9 | 768 |
| Last release | Nov 24, 2026 | May 1, 2021 | Nov 1, 2026 |
| Releases, 12 months | 15 | 0 | 3 |
| Weeks with commits | 16 / 26 | 0 / 26 | 7 / 26 |
| Recent contributors | 3 | 2 | 18 |
| First release | Jul 2026 | Dec 2020 | Apr 2012 |
| Python versions | 3.10 – 3.15 | 3.6 – 3.8 | 3.10 – 3.14 |
| License | GPL-3.0-or-later | Apache-2.0 | non-standard |
| Known vulnerabilities | None | None | None |
Bold marks the best value in each row. Pythie’s Index rates maintenance out of 100: how it works.