nowfound

Dev tools · alternatives · 2026

24 alternatives to 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…

Below are 24 products that do a similar job, ranked by how close each is in meaning and then by launch-day votes.

  1. 1

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

    2022 · github.com · its alternatives →

  2. 2
    JupySQL▲115

    JupySQL is a SQL client for Jupyter

    2023 · its alternatives →

  3. 3

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

    2023 · github.com · its alternatives →

  4. 4

    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…

    2022 · github.com · its alternatives →

  5. 5

    Transform messy SQL into clean, readable code instantly

    2024 · sqlformatter.app · its alternatives →

  6. 6

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

    2020 · github.com · its alternatives →

  7. 7

    SQL-tString is a SQL builder that utilises the recently accepted PEP-750, https://peps.python.org/pep-0750/, t-strings to build SQL queries, for example, from sql_tstring import sql val = 2 query, values = sql(t"SELECT x FROM y WHERE x = {val}") assert query == "SELECT x FROM y WHERE x = ?" assert values == [2] db.execute(query, values) # Most DB engines support this The placeholder ? protects against SQL injection, but cannot be used everywhere. For example, a column name cannot be a placeholder. If you try this SQL-tString will raise an error, col = "x" sql(t"SELECT…

    2025 · github.com · its alternatives →

  8. 8

    Format SQL queries for MySQL, PostgreSQL, SQLite, and SQL Server. Beautify keywords, line breaks, and indentation with 100% browser privacy.

    2023 · normaltool.com · its alternatives →

  9. 9

    PugSQL is a Python library for interacting with your database the way the gods intended.

    2019 · pugsql.org · its alternatives →

  10. 10

    Rich is a Python library for rich text and beautiful formatting in the terminal. - Textualize/rich

    2020 · github.com · its alternatives →

  11. 11

    Lightweight text-based SQL parameter binds. Contribute to baverman/sqlbind development by creating an account on GitHub.

    2024 · github.com · its alternatives →

  12. 12

    Check if your SQL is readable or not

    2022 · its alternatives →

  13. 13

    A spreadsheet with SQL, JavaScript, and Python built in

    2022 · equals.com · its alternatives →

  14. 14

    A SQL database implemented purely in TypeScript type annotations. - codemix/ts-sql

    2020 · github.com · its alternatives →

  15. 15
  16. 16

    I’ve been impressed with Claude Code but one thing that sometimes gets in the way in my workflows is the messy, mangled text that is shown when pasting text from the Claude Code terminal sessions. So I built an open-source utility that cleans extraneous white space, pipes, and other characters from your CC/Codex pastes. For example, you can turn this: `How can I create a Claude Code script that │ │ cleans up extraneous characters and cleans up │ │ extra spaces, new lines, and other messiness │ when I copy from Claude Code terminal │ │ prompts or copy code from Claude Responses in │ │…

    Mar 2026 · cleanclode.com · its alternatives →

  17. 17SQ

    Part of the workflow for building my website is the generation of a table in tab-separated column format (.tsv). The source data is found in four other .tsv files. I use an SQLite query to perform a 4-way join and write out the new table. For convenience, I wrote a script that encapsulates the query inside a Bash function. The example below illustrates this technique. repertoire() { pushd $CMM_SOURCES&#x2F;_data sqlite3 <<EOS .headers on .mode tabs .import category.tsv category .import composition.tsv composition .import concert.tsv concert .import program.tsv program .once repertoire.tsv…

    2021 · its alternatives →

  18. 18

    Last year, I wanted to learn a bit about how easy it would be to deploy a python app via web assembly to the browser and decided to make a wrapper around the amazing sqlglot by Toby Mao and the rest of the team. The tool lets you paste in Sql queries and translate them between the available sql dialects in sqlglot. It also gives you parse diagnostics and the ability to easily share queries via storing all the state in the url. The stack that was used is typescript for the UI and pyodide to integrate with Sqlglot, which does the heavy lifting. It's more of a toy app but I've found some use…

    2025 · sqlscope.netlify.app · its alternatives →

  19. 19

    A lightweight database with Python syntax queries, using ZeroMQ - asrp/pyzdb

    2017 · github.com · its alternatives →

  20. 20

    I work mostly in the terminal but found myself constantly switching to bloated GUIs like SSMS only for the simple task of browsing tables and run queries. And I didn't find Existing SQL TUIs intuitive, having to read documentation to learn keybindings and CLI flags to connect. Given I had recently switched to linux, I found myself using vs code's sql database extension. Something was awfully wrong. I wanted something like lazygit for databases – run it, connect, and query and frankly just make it enjoyable to access data. Sqlit is a keyboard-driven SQL TUI with: - Context-based keybindings…

    Dec 2025 · github.com · its alternatives →

  21. 21

    Write Better Python with Clean, Readable Code.

    Jan 2026 · 99tools.net · its alternatives →

  22. 22
    PyQL▲15

    A tool to run SQL queries on Python files built using GitQL

    2024 · github.com · its alternatives →

  23. 23

    Analyze CSV records using sql syntax right in your browser

    2022 · csv-query.com · its alternatives →

  24. 24

    The easiest way to learn SQL

    2015 · sqlteaching.com · its alternatives →

Also compare

Ranked by how close each launch is in meaning, then by votes. Prices were read from each product’s own site when checked and can change. Refine with your own description →