Usage¶

This section provides focused guides on core SQLSpec workflows. Each page highlights the minimum you need to move fast, with links to deeper examples when you want more detail.

Choose a topic¶

Data Flow

How SQLSpec sessions, drivers, and results flow together.

Data Flow
Configuration

Configure adapters, sessions, and registry options.

Configuration
Drivers & Querying

Execute statements, bind parameters, and batch work.

Drivers and Querying
Query Builder

Build safe SQL using the fluent builder.

Query Builder
SQL Files

Load, organize, and reuse SQL from files.

SQL File Loader
CLI

Manage migrations and automation from the terminal.

Command Line Interface
Migrations

Apply schema changes with consistent workflows.

Migrations
Framework Integrations

Plug SQLSpec into Litestar, FastAPI, Flask, or Starlette.

Framework Integrations
Observability

Trace queries, sample traffic, and log structured events.

Observability
Extensions

Add service-specific helpers like the ADK extension.

<no title>