RowGuard documentation¶
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.
Pick the path that matches how you work:
Install → Quickstart (default path first) → SQLRules pushdown.
Why invalid rows can “disappear” with the default use_sqlrules=True—and when to turn pushdown off.
Use aselect / astream with AsyncSession, or stream large results without buffering accepted models.
0.5 vs planned 0.6+ features. Prefer this page over design drafts in the sidebar.
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.
pip install "rowguard[async]".
SQLModel: pip install "rowguard[sqlmodel]".
Documentation map¶
Getting started
Guides
Reference
- API.md
- RowGuard Public API
- Python autodoc
- Error catalog
- SPEC.md
- RowGuard Specification
- Scope
- Core Pipeline
- Primary API
- QueryResult
- RejectedRow
- Rejection Policies
- SQLRules Integration
- Validation
- Supported Inputs
- Streaming
- Async
- Statistics
- Diagnostics
- Error Model
- SQLModel Position
- Performance Goals
- Plugin Opportunities
- Compatibility
- Design Principles
- Success Criteria
Architecture
Project
- Supported vs planned
- Changelog
- ROADMAP.md
- RowGuard Roadmap
- Design Principles
- 0.1.0 — Validation-First Core (shipped)
- 0.2.0 — Execution Planning (shipped)
- 0.3.0 — Streaming Engine (shipped)
- 0.4.0 — Async Engine (shipped)
- 0.5.0 — ORM and SQLModel Integration (shipped)
- 0.6.0 — Rejection Platform (shipped)
- 0.7.0 — Plugin System
- 0.8.0 — Dialects, Reflection, and Raw SQL
- 0.9.0 — Stabilization and Release Candidate
- 1.0.0 — Stable
- Post-1.0
- Long-Term Ecosystem
- Security Policy
- Releasing
- Contributor Covenant Code of Conduct
- CONTRIBUTING.md
- Contributing to RowGuard
- Project Mission
- Ways to Contribute
- Before Starting
- Development Setup
- Supported Tooling
- Common Commands
- Architecture First
- Design Boundaries
- Coding Standards
- Type Checking
- Public API Changes
- Error Design
- Diagnostics
- Security
- Testing Requirements
- Test Style
- Database Tests
- Async Contributions
- Streaming Contributions
- Performance Contributions
- Plugin Contributions
- Dialect Contributions
- Documentation Style
- Commit Style
- Pull Requests
- Pull Request Checklist
- Review Priorities
- Backward Compatibility
- Deprecation
- Dependency Policy
- Release Notes
- Issue Reports
- Feature Requests
- Security Reports
- Code of Conduct
- Good First Contributions
- Maintainer Responsibilities
- Design Principles
- TESTING.md
- RowGuard Testing Strategy
- Testing Principles
- Test Layers
- Test Matrix
- Model Fixtures
- Database Fixtures
- SQLRules Integration Tests
- Row Adapter Tests
- Validation Engine Tests
- Rejection Policy Tests
- Streaming Tests
- Async Tests
- Core Integration Tests
- ORM Tests
- SQLModel Tests
- Raw SQL Tests
- Reflection Tests
- Cache Tests
- Plugin Tests
- Diagnostics Tests
- Statistics Tests
- Security Tests
- Property-Based Testing
- Golden and Snapshot Tests
- Dialect Test Matrix
- Test Isolation
- Temporary Resources
- Error Injection
- Coverage
- Type Checking
- Linting and Formatting
- Documentation Tests
- Compatibility Tests
- CI Workflow
- Flaky Tests
- Test Naming
- Test Directory Layout
- MVP Testing Requirements
- Release Gates
- Design Principles
- BENCHMARKS.md
- RowGuard Benchmarking
- Benchmark Principles
- Baselines
- Benchmark Categories
- Representative Models
- Representative Data Quality
- Representative Row Counts
- Database Backends
- Driver Versions
- Metrics
- Timing
- Statistical Reporting
- Warm-Up
- Planning Benchmarks
- Pushdown Benchmarks
- Projection Benchmarks
- Adapter Benchmarks
- Validation Benchmarks
- Rejection Benchmarks
- Quarantine Benchmarks
- Streaming Memory Benchmark
- Async Benchmarks
- Cache Benchmarks
- Diagnostics Benchmarks
- Plugin Overhead
- Benchmark Dataset Generation
- Correctness During Benchmarks
- Tooling
- Benchmark Directory
- CI Strategy
- Regression Policy
- Benchmark History
- Performance Budgets
- Benchmark Reporting
- User-Facing Benchmarks
- Profiling Workflow
- MVP Benchmark Requirements
- Design Principles
- MILESTONES.md
- RowGuard Milestones
- Release Philosophy
- 0.1.0 — Validation-First Core
- 0.2.0 — Execution Planning
- 0.3.0 — Streaming Engine (shipped)
- 0.4.0 — Async Engine
- 0.5.0 — ORM and SQLModel Integration
- 0.6.0 — Rejection Platform
- 0.7.0 — Plugin System
- 0.8.0 — Dialects, Reflection, and Raw SQL
- 0.9.0 — Stabilization and Release Candidate
- 1.0.0 — Stable Release
- Post-1.0 Roadmap
- Cross-Cutting Workstreams
- Milestone Dependencies
- Scope Control
- Release Checklist
- Design Principles
- Cursor Build Prompt