sqlspec

Installation
SKILL.md

SQLSpec Skill

Project Overview

SQLSpec is a type-safe SQL query mapper for Python - NOT an ORM. It provides flexible connectivity with consistent interfaces across multiple database systems. Write raw SQL, use the builder API, or load SQL from files. All statements pass through a sqlglot-powered AST pipeline for validation and dialect conversion.

Key Design Principles

  1. Single Source of Truth: The SQL object holds all state for a given statement
  2. Immutability: All operations on a SQL object return new instances
  3. Type Safety: Parameters carry type information through the processing pipeline
  4. Separation of Concerns: Clear boundaries between statement representation, parameter processing, and driver execution
  5. Protocol-Based Design: Uses Python protocols for runtime type checking instead of inheritance
  6. Single-Pass Processing: Parse once, transform once, validate once

Current Capability Snapshot (main branch, 2026-02-25)

Installs
1
Repository
cofin/flow
GitHub Stars
15
First Seen
Mar 17, 2026
sqlspec — cofin/flow