SQL-tString a t-string SQL builder in Python
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…
SQL-tString a t-string SQL builder in Python launched on May 16, 2025 with 85 votes, #534 of 7,905 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 1 year on.
In plain words
SQL-tString is a Python SQL builder that uses PEP-750 t-strings to construct database queries safely. It automatically converts variable expressions into parameterized queries with placeholders to prevent SQL injection attacks. The tool is designed for Python developers building database applications and distinguishes itself by raising errors when non-parameterizable elements like column names are used without explicit declaration, requiring developers to specify allowed values through a context manager for full query control.
written from the facts on this page · September 2026
From the sources
SQL-tString allows for f-string like construction of sql queries - GitHub - pgjones/sql-tstring: SQL-tString allows for f-string like construction of sql queries
SQL-tString allows for t-string based construction of sql queries without allowing for SQL injection. The basic usage is as follows, from sql_tstring import sql a = 1 query , values = sql ( t """SELECT a, b, c FROM tbl WHERE a = {a}""" , ) The query is a str and values a list[Any] , both are then typically passed to a DB connection. Note the parameters can only be identifiers that identify variables (in the above example in the locals()) e.g. {a - 1} is not valid. SQL-tString will convert parameters to SQL placeholders where appropriate. In other locations SQL-tString will allow pre defined column or table names to be used, from sql_tstring import sql , sql_context col = "a" table = "tbl"…from github.com
In the maker’s words, at launch
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…
Does a similar job
all alternatives →
A SQL database implemented purely in TypeScript type annotations2020 · github.com · ▲426A SQL database implemented purely in TypeScript type annotations. - codemix/ts-sql
Using SQL's Turing completeness to build Tetris2024 · github.com · ▲338Using SQL's Turing Completeness to Build Tetris. Contribute to nuno-faria/tetris-sql development by creating an account on GitHub.
Sqlbind a Python library to compose raw SQL2024 · github.com · ▲69Lightweight text-based SQL parameter binds. Contribute to baverman/sqlbind development by creating an account on GitHub.
- SQSQLite query inside a Bash function2021 · ▲134
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/_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…
Translate English to SQL2019 · github.com · ▲209inferring sql queries from plain-text questions about tables - paulfitz/mlsql
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.
More dev tools this month
the category →

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▲362Grok Bot alternative: free, local, open-source, multiplayer
Dev tools · 23d ago · openbot.run
Talanoa▲346Hi 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▲332One 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 2025
the whole month →
Tapflow 2.0▲1,125We built Tapflow for devs, designers, PMs, and tech folks who’ve been sitting on internal docs, templates, and systems — but never productized them. Upload a PDF, notes, or workshop deck, and Tapflow drafts a structured product (with chapters, teaser and pricing plans). It’s good for AI kits, onboarding guides, design systems, and frameworks. You can sell through Stripe, LemonSqueezy, or PayPal. Real-time collaboration is in early beta. No site builder, no LMS — clean design and just focused tools to ship. Fully bootstrapped and just launched on PH today →…
Work · 2025 · tapflow.ai
- C9
Life & fun · 2025 · felixrieseberg.github.io
Appwrite Sites▲990Appwrite 2.0 brings a new engine, a rebuilt Console, five database types, an S3 API, an OAuth 2.1 server, and organization-level Domains and Firewall.
Dev tools · 2025 · appwrite.io


