Comparison
pgparse vs sql-formatter vs sqlparse vs sqlvalidator
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Python wrapper for libpg_query
Low maintenance activity. Last release 8 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install pgparseA 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 sqlparseSQL queries formatting, syntactic and semantic validation
Slowing down. Last release over 3 years ago, little activity since. Fine for existing code; think twice for a new project.
pip install sqlvalidatorIn short
- sql-formatter looks abandoned: avoid it for new projects.
- sqlvalidator is slowing down (last release over 3 years ago): fine for existing code, risky for a new project.
- sqlparse is the most used: 128.9M downloads a month, 200× more than sql-formatter.
- sqlparse also has the best Pythie’s Index (62).
- pgparse is growing fastest: downloads +195% over the last month.
- Safe default for a new project: sqlparse.
Side by side
| Metric | pgparse | sql-formatter | sqlparse | sqlvalidator |
|---|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 35 | Pythie’s Index: 9 | Pythie’s Index: 62 | Pythie’s Index: 18 |
| Verdict | Low maintenance activity | Likely abandoned | Maintained | Slowing down |
| Downloads / month | 473.8K | 646.1K | 128.9M | 105.2K |
| Downloads, month over month | +195% | -1% | +7% | +13% |
| GitHub stars | 2 | 46 | 4K | 74 |
| Stars, last 7 days | – | – | – | – |
| Direct dependents | 1 | 9 | 768 | 8 |
| Last release | Mar 19, 2026 | May 1, 2021 | Nov 1, 2026 | Dec 25, 2022 |
| Releases, 12 months | 2 | 0 | 3 | 0 |
| Weeks with commits | 0 / 26 | 0 / 26 | 7 / 26 | 0 / 26 |
| Recent contributors | 1 | 2 | 18 | 3 |
| First release | Jul 2019 | Dec 2020 | Apr 2012 | May 2020 |
| Python versions | 3.11 – 3.14 | 3.6 – 3.8 | 3.10 – 3.14 | 3.7 – 3.11 |
| License | BSD-3-Clause | Apache-2.0 | non-standard | MIT |
| Known vulnerabilities | None | None | None | None |
Bold marks the best value in each row. Pythie’s Index rates maintenance out of 100: how it works.