RowGuard documentation

v0.6.0 SQLAlchemy · Pydantic Sync · Async · Streaming

RowGuard documentation

Validated SQLAlchemy reads with Pydantic

By default, SQLRules pushes supported constraints into SQL. Every fetched row becomes an accepted model or an explicit rejection—never ignored after fetch. Same semantics for buffered, streaming, sync, and async APIs.

Start here →

Pick the path that matches how you work:

Start here

Install → Quickstart (default path first) → SQLRules pushdown.

Start here
SQLRules defaults

Why invalid rows can “disappear” with the default use_sqlrules=True—and when to turn pushdown off.

SQLRules pushdown
Async & streaming

Use aselect / astream with AsyncSession, or stream large results without buffering accepted models.

Async
What is shipped?

0.5 vs planned 0.6+ features. Prefer this page over design drafts in the sidebar.

Supported vs planned

Coming from raw SQLAlchemy?

Keep your Table / Select and sessions. RowGuard adds planning, validation, and rejection handling around them—it does not replace SQLAlchemy.

Design docs

Long design notes and Future / design pages are built but hidden from the main sidebar. Start from guides and Supported vs planned. Unshipped features are not available in 0.6.0.

Requires Python 3.10+, Pydantic v2, SQLAlchemy 2.x, and SQLRules ≥1.0. Async extras: pip install "rowguard[async]". SQLModel: pip install "rowguard[sqlmodel]".

Documentation map

Project