rowx¶
rowx is typesafe raw SQL for Python 3.14+. A query is a PEP 750 t-string with an
explicit row type. A Rust driver built on tokio-postgres runs it, and rowx check prepares every query against a live
Postgres 18 database.
from rowx import query
from rowx.postgres import connect
async with await connect(dsn) as conn:
name = await query[str](t"SELECT name FROM users WHERE id = {user_id}").one(conn)
The block above is an illustration. The user guide has samples the test suite runs.
- User guide: install, queries, rows, executors, the checker, migrations, and testing.
- Why rowx: where SQL lives, and how a live database check compares with other libraries.
- Embedded Postgres: an in-process Postgres 18 for development, checking and tests, with no server.
- Packages: the four distributions and the canonical imports.
- Postgres type mapping: what each Postgres type decodes to, and which Python values can be bound.
- Known limits: where nullability inference is less precise than the database.
- Changelog: what changed in each release.
- use-rowx skill: agent guidance for
queries, the package split, and
rowx check.
Install the checker and the PostgreSQL backend with uv add "rowx[postgres]".