{"categories":[{"label":"Text Processing","url":"https://skillfed.io/packages/category/text-processing/2"}],"enrichment":{"capability":"Reformats SQL queries into standardized, readable form with consistent indentation, capitalization, and line breaks, handling SELECT and CREATE statements with subqueries.","skillfed_tags":["sql-formatting","code-style","cli-tool"],"use_cases":["Format SQL files in a pre-commit hook to enforce consistent styling across a team's repository.","Reformat ad-hoc or poorly formatted SQL queries in Python scripts to improve readability before review or deployment.","Batch-process a directory of SQL files to standardize indentation and keyword casing across a legacy codebase.","Integrate into a data pipeline to normalize query formatting for logging or audit purposes.","Use as a command-line tool to quickly beautify SQL files during development without leaving the terminal."],"what_it_does":"sql-formatter is a Python-based command-line and library tool that reformats SQL queries into a standardized, readable layout. It uses indentation and case normalization (uppercasing keywords, lowercasing identifiers) to enhance readability and make query structure immediately apparent. The formatter handles SELECT and CREATE TABLE/VIEW statements, including subqueries and joins, and can be invoked from the command line on individual files or batches, integrated into pre-commit hooks, or called directly from Python code.\n\nThe package includes basic validation to catch common mistakes like forgotten semicolons, unbalanced parentheses, and mismatched CASE/WHEN/END blocks. It does not parse SQL into data structures, validate queries against a specific database system, or format other SQL commands like INSERT or UPDATE. The project is no longer actively maintained as of April 2022, so it may not reflect current SQL standards or work seamlessly with the latest Python versions.","worth_installing":"Yes, if you need a lightweight, dependency-free SQL formatter for SELECT and CREATE statements and can tolerate an unmaintained codebase. The permissive Apache license and zero runtime dependencies make it low-friction to add. However, do not rely on it for production systems handling modern SQL dialects or requiring ongoing support\u2014test thoroughly with your SQL patterns first, and consider alternatives if you need active maintenance or broader SQL command support."},"id":"sql-formatter","links":{"html":"https://skillfed.io/packages/sql-formatter","md":"https://skillfed.io/packages/sql-formatter.md","pypi":"https://pypi.org/project/sql-formatter/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2021-05-01","license_spdx":null,"license_treatment":"permissive","name":"sql-formatter","python_support":"supports_current","summary":"A SQL formatter"},"popularity":{"monthly_downloads":854612,"position":4894,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.6.2"}
