Alternatives
Products that do what SQL-tString a t-string SQL builder in Python does
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…
- Not indexed yet — check back in a few minutes.
Ranked by how close each launch is in meaning, then by votes. Refine with a description →