nowfound

Dev tools · May 28, 2026

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…

Py-SQL-cleaner – format SQL embedded in Python strings launched on May 28, 2026 with 7 votes, #1,574 of 20,538 launches that month and more than 75% of that year's launches.

Visit github.com ↗Alternativestop 8% of May 2026

What it does

Find, format, and safely extract embedded SQL from Python files. - enumura1/py-sql-cleaner

py-sql-cleaner is a CLI tool for finding, formatting, and extracting SQL embedded in Python files. It is built for Python codebases where long SQL queries are written directly inside triple-quoted Python strings. The current MVP uses SQLGlot for formatting, defaults to SQLGlot's generic dialect, and can format with database-specific dialects that this project has explicitly enabled via --dialect . query = """ select user_id, updated_at from users qualify row_number() over(partition by user_id order by updated_at desc)=1 """ py-sql-cleaner can format that SQL in place, or extract it into an external .sql file. py-sql-cleaner is an early MVP. It uses SQLGlot internally for best-effort SQL…from github.com

In the maker’s words, at launch

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…

Does a similar job

all alternatives →
  • Inline SQL in any Python program2022 · github.com · ▲26

    🪄 Inline SQL in any Python program. Contribute to ekzhang/inline-sql development by creating an account on GitHub.

  • JupySQL2023 · ▲115

    JupySQL is a SQL client for Jupyter

  • I wrote a RDBMS (SQLite clone) from scratch in pure Python2023 · github.com · ▲371

    I wrote a relational database management system (RDBMS) (sqlite clone) from scratch in pure Python.

  • SPyQL – SQL with Python in the middle2022 · github.com · ▲105

    SPyQL (https://github.com/dcmoura/spyql) is SQL with Python in the middle, an open-source project fully written in Python for making command-line data processing more intuitive, readable and powerful. Try mixing in the same pot: a SQL SELECT for providing the structure, Python expressions for defining transformations and conditions, the essence of awk as a data-processing language, and the JSON handling capabilities of jq. How does a SPyQL query looks like? $ spyql “ IMPORT pendulum AS p SELECT (p.now() - p.from_timestamp(purchase_ts)).in_days() AS days_ago, sum_agg(price…

  • SQL Query Formatter2024 · sqlformatter.app · ▲11

    Transform messy SQL into clean, readable code instantly

  • Csql – Python lib for composeable SQL queries2020 · github.com · ▲89

    Contribute to akdor1154/python-csql development by creating an account on GitHub.

More dev tools this month

the category →
  • /dev/null▲486

    a social network for devs

    Dev tools · 3d ago · dev-null.sh

  • open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.

    Dev tools · 28d ago · github.com

  • Contribute to reladraw/reladraw development by creating an account on GitHub.

    Dev tools · 26d ago · github.com

  • OpenBot▲362

    Grok Bot alternative: free, local, open-source, multiplayer

    Dev tools · 23d ago · openbot.run

  • Talanoa▲346

    Hi HN, I’m a fullstack developer, and honestly, I’ve lost count of how many side projects I’ve worked on over the years. But one idea kept coming back to me: a different kind of email client. It first came to me in 2014: “What if we could handle emails more like conversations?” Every year, I’d revisit this concept in my “Build Notes.” Ten years later, no one had built exactly what I had in mind — so I finally decided to do it myself. That’s how Talanoa was born. I wanted something focused on people, not timelines. I was tired of marking messages as unread just to remember to reply later, or…

    Dev tools · 21d ago · talanoa.email

  • CoreSpeed▲332

    One MCP for everything your agents need: apps, memory, tools

    Dev tools · 28d ago · corespeed.io

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, May 2026

the whole month →
  • Brew ▲900

    Like Claude design for email marketing

    AI · May 2026 · brew.new

  • Parallel agents, diff reviewer, and multi-model comparisons

    Dev tools · May 2026 · kilo.ai

  • StoreClaw▲806

    Grow your store profits with agents that know how to sell

    AI · May 2026 · storeclaw.ai

  • Give your agent a real number and voice to make calls.

    AI · May 2026 · pollyreach.ai

  • Hey HN, Henry here from Cactus. We open-sourced Needle, a 26M parameter function-calling (tool use) model. It runs at 6000 tok/s prefill and 1200 tok/s decode on consumer devices. We were always frustrated by the little effort made towards building agentic models that run on budget phones, so we conducted investigations that led to an observation: agentic experiences are built upon tool calling, and massive models are overkill for it. Tool calling is fundamentally retrieval-and-assembly (match query to tool name, extract argument values, emit JSON), not reasoning. Cross-attention…

    Life & fun · May 2026 · github.com

  • 🌱 Private, quiet space for thinking. Simple app for .md files. - zakirullin/files.md

    Dev tools · May 2026 · github.com