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¶
How SQLSpec sessions, drivers, and results flow together.
Configure adapters, sessions, and registry options.
Execute statements, bind parameters, and batch work.
Build safe SQL using the fluent builder.
Load, organize, and reuse SQL from files.
Manage migrations and automation from the terminal.
Apply schema changes with consistent workflows.
Plug SQLSpec into Litestar, FastAPI, Flask, or Starlette.
Trace queries, sample traffic, and log structured events.
Add service-specific helpers like the ADK extension.
Recommended Path¶
Start with Data Flow to understand how sessions, drivers, and results connect.
Configure your database in Configuration with adapter-specific settings.
Execute queries using Drivers and Querying for transaction and parameter patterns.
Build queries safely with the Query Builder for programmatic SQL construction.
Organize SQL in files using SQL File Loader when your project grows.
Integrate with your framework via Framework Integrations for Litestar, FastAPI, Flask, or Starlette.