Data & Storage · zero-dependency · MIT

larzsql

Injection-safe SQL builder.

Builds SELECT/INSERT/UPDATE/DELETE as (sql, params) where every value is a bound parameter and identifiers are validated — so SQL injection is impossible by construction, not by discipline.

larzscript pkg install sql
View on GitHub →Learn the stack

What you get

Try it

import "sql" as sql
let q = sql.limit(sql.where(sql.select_("users", ["id", "name"]), "age", ">", 18), 10)
let built = sql.build(q)
print(built["sql"])
print(built["params"])
Output
SELECT id, name FROM users WHERE age > ? LIMIT ?
[18, 10]

Why it's in the Larz Stack

larzsql is a real Larzscript package (larzscript pkg install sql) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.