This is a autopost bolg frinds we are trying to all latest sports,news,all new update provide for you
Thursday, May 28, 2026
Show HN: Py-SQL-cleaner – format SQL embedded in Python strings https://ift.tt/OB3XEy5
Show HN: Py-SQL-cleaner – format SQL embedded in Python strings Hi HN, I built py-sql-cleaner, a CLI for formatting SQL embedded in Python files. Python formatters handle Python syntax. They do not format SQL written inside Python code.
On the other hand, SQL formatters usually target SQL files or raw SQL text, not SQL embedded inside a Python file. Still, I think it is not uncommon to find long SQL queries inside Python codebases. py-sql-cleaner detects embedded SQL inside Python files and works only on that SQL.
The main things it can do are: find the SQL, format it in place, or extract it into a .sql file. It avoids rewriting SQL that depends on runtime values or template expansion.
For example, SQL containing parameters like %s or :name, or Jinja-style template variables like {{ ds }}, is skipped by default. Try it with: uvx py-sql-cleaner list path/to/file.py
uvx py-sql-cleaner format path/to/file.py --dry-run
If you write Python, have run into this kind of SQL cleanup problem, or are just curious, I’d be happy if you take a look. https://ift.tt/Wlw5nyj May 28, 2026 at 11:00PM
Subscribe to:
Post Comments (Atom)
Show HN: Scrolodex – A super simple window switcher for macOS https://ift.tt/r7w1V5X
Show HN: Scrolodex – A super simple window switcher for macOS I built scrolodex to scratch my own itch of having a quick and simple way to s...
-
Show HN: A directory of 800 free APIs, no auth required Explore reliable free APIs for developers — ideal for web and software development, ...
-
Show HN: I built Dirac, Hash Anchored AST native coding agent, costs -64.8 pct Fully open source, a hard fork of cline. Full evals on the gi...
-
Show HN: I built a FOSS tool to run your Steam games in the Cloud I wanted to play my Steam games but my aging PC couldn’t keep up, so I bui...
No comments:
Post a Comment