Start here¶
RowGuard turns SQLAlchemy query results into validated Pydantic models.
Day-1 path: Install → Quickstart → skim SQLRules pushdown.
By default, SQLRules pushes supported constraints into SQL. Every row that
reaches validation is accepted or explicitly rejected—never ignored after
fetch. Use use_sqlrules=False when you need invalid rows classified in Python.
Choose a path¶
You want to… |
Go to |
|---|---|
Install and run a first query |
|
Understand why |
|
Upgrade from a prior minor |
|
Rejection policies |
|
Stream large results |
|
AsyncSession |
|
Performance tips |
|
What is shipped vs planned |
|
API contracts |
What RowGuard is¶
Orchestration over SQLAlchemy + SQLRules + Pydantic
Sync and async buffered and streaming APIs
Policies:
raise(default),collect,skip,log,callback,quarantine
What RowGuard is not¶
Not an ORM / persistence layer (it validates ORM and SQLModel reads)
Not a migration tool
Not a replacement for SQLAlchemy or Pydantic
Not an authorization system (pushdown is not a security boundary)
Requirements¶
Python 3.10+ (3.10–3.12 tested in CI; 3.13 untested)
Pydantic v2, SQLAlchemy 2.x, SQLRules ≥ 1.0
Optional: pip install "rowguard[async]" / "rowguard[sqlmodel]".
Next¶
Quickstart — default path first, then inspect rejections