sqlparse
« Back to VersTracker
Description:
Non-validating SQL parser
Type: Formula  |  Latest Version: 0.5.4@0  |  Tracked Since: Dec 19, 2025
Links: Homepage  |  GitHub  |  formulae.brew.sh
Stars: 3,973  |  Forks: 716  |  Language: Python  |  Category: Developer tools
Tags: sql parser python formatting database
Install: brew install sqlparse
About:
sqlparse is a Python library that parses SQL statements without validating them against a specific SQL dialect. It provides a structured representation of SQL queries, enabling tasks like formatting, syntax highlighting, and query analysis. Its main value is as a foundational tool for building SQL linters, formatters, and other database development utilities.
Key Features:
  • Non-validating SQL parser for multiple dialects
  • Formatting and beautification of SQL statements
  • Splitting of SQL scripts into individual statements
  • Structured output as a parse tree for programmatic analysis
Use Cases:
  • Building SQL code formatters and linters
  • Syntax highlighting in SQL editors and IDEs
  • Analyzing and refactoring complex SQL scripts
Alternatives:
  • sqlglot – More comprehensive, aims to be a full SQL transpiler with validation and dialect translation.
  • python-sqlparser – Often a wrapper around a C++ library (like hyrise/sql-parser), providing validation and a different API.
Version History
Detected Version Rev Change Commit
Dec 19, 2025 8:14am 0.5.4 0 VERSION_BUMP b756025f
Oct 12, 2025 10:19am 0 VERSION_BUMP 8c513932
Nov 14, 2024 12:56pm 0 VERSION_BUMP 692afde6
Oct 10, 2024 8:43am 0 VERSION_BUMP 71b314cb