# 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…

Page: https://nowfound.app/launch/sql-tstring-a-t-string-sql-builder-in-python

- Launched: 2025-05-16
- Launch-day votes: 85, 35 comments; #535 of 7,936 launches that month (top 7%)
- Website: [github.com](https://github.com/pgjones/sql-tstring), online when checked 2026-12-06
- Category: [Dev tools](https://nowfound.app/c/developer-tools.md)
- Pricing: Free. Free and open source (checked 2026-11-21 on its site)
- Forecast: 92% chance its website is still online in November 2031 (98% in November 2027, 94% in November 2029). Made 2026-11-29 and not revised. Typical launch of 2025: 87%. [Method](https://nowfound.app/forecast.md)
- Originality: 80/100 (original). More original than 80% of products launched in 2025. On its launch day the archive already held 2 similar products; 3 products like it have launched since.

## 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 by AI from its launch page and website, 2026-09-05._

## What it does, from its own words

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

## Does a similar job

- [dataherald](https://nowfound.app/launch/we-open-sourced-our-entire-text-to-sql-product): Long story short: We (Dataherald) just open-sourced our entire codebase, including the core engine, the clients that interact with it and the backend application layer for authentication and RBAC. Yo… (2024-05-23, 464 votes, free, forecast: 96% online in 2031, github.com)
- [SQLite query inside a Bash function](https://nowfound.app/launch/sqlite-query-inside-a-bash-function): This is a Bash scripting technique for automating data processing workflows. (2021-07-07, 134 votes, forecast: 83% online in 2031)
- [ORM for TypeScript with no query-builder](https://nowfound.app/launch/orm-for-typescript-with-no-query-builder-supporting-full-sql): An extremely simple and explicit ORM for TypeScript (2020-09-03, 220 votes, free, forecast: 95% online in 2031, github.com)
- [PgTyped](https://nowfound.app/launch/pgtyped-typesafe-sql-in-typescript-and-postgres): pgTyped - Typesafe SQL in TypeScript. (2020-05-25, 269 votes, free, forecast: 95% online in 2031, github.com)
- [Csql](https://nowfound.app/launch/csql-python-lib-for-composeable-sql-queries): Csql is a Python library that helps developers build SQL queries through composition. (2020-10-23, 89 votes, free, forecast: 88% online in 2031, github.com)
- [Sqlit](https://nowfound.app/launch/sqlit-a-lazygit-style-tui-for-sql-databases): Sqlit is a terminal user interface for browsing and querying SQL databases, designed for developers who work primarily in the command line. (2025-12-15, 190 votes, free, forecast: 93% online in 2031, github.com)

All alternatives: https://nowfound.app/alternatives/sql-tstring-a-t-string-sql-builder-in-python.md

## For the maker of SQL-tString a t-string SQL builder in Python

- Feature it at the top of the NowFound home page for $19 for 30 days, marked sponsored: https://nowfound.app/feature/sql-tstring-a-t-string-sql-builder-in-python
- Free: put the badge on the product's own site and it joins Featured products after the paid spots, and this page links to the site with a normal link search engines follow. HTML for the footer: `<a href="https://nowfound.app/launch/sql-tstring-a-t-string-sql-builder-in-python"><img src="https://nowfound.app/badge/sql-tstring-a-t-string-sql-builder-in-python.svg" alt="SQL-tString a t-string SQL builder in Python on NowFound" height="32"></a>`

Source: [Show HN post](https://news.ycombinator.com/item?id=44004827)
