sqlspec

Execute type-safe SQL queries across 18+ database adapters with parameterized execution.

13|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/litestar-org/litestar-skills --skill sqlspec-litestar-org
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sqlspec
Source: https://github.com/litestar-org/litestar-skills/tree/main/plugins/litestar/skills/sqlspec
Command: npx skills add https://github.com/litestar-org/litestar-skills --skill sqlspec-litestar-org

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the manual overhead of writing dialect-aware, type-safe SQL across multiple database adapters, avoiding the constraints and boilerplate of traditional ORMs while handling parameter styles, connection lifecycle, and bulk operations out of the box.

Core Features & Use Cases

  • Multi-Adapter SQL Support: Execute type-safe queries across 18+ database adapters (PostgreSQL, MySQL, Oracle, BigQuery, DuckDB, etc.) with automatic parameter style conversion and dialect transpilation.
  • Framework Integrations: First-party plugins for Litestar, FastAPI, Starlette, and Flask with built-in DI, commit modes, session stores, and filter dependencies.
  • Advanced Data Workflows: Native Arrow/ADBC integration for analytics, bulk ingest via storage bridge, SQL file loading with caching, ADK agent storage, and vector search support.
  • Use Case: Build a multi-database application with a PostgreSQL primary store and DuckDB analytics warehouse, using typed models for query results and native Arrow transfer for cross-database data pipelines.

Quick Start

Use the sqlspec skill to configure an asyncpg adapter, define a typed User dataclass, and run a parameterized paginated query with ordering and search filters in your Litestar project.

Frequently Asked Questions about sqlspec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I execute type-safe SQL queries across multiple databases without ORM overhead?

Type-safe SQL queries across multiple databases without ORM overhead are executed using dialect-aware adapters that handle parameter style conversion and connection lifecycle automatically, supporting 18+ backends including PostgreSQL, MySQL, Oracle, BigQuery, and DuckDB.

Can I use sqlspec to integrate DuckDB analytics with a PostgreSQL primary store?

Yes, you can integrate DuckDB analytics with a PostgreSQL primary store by utilizing multi-adapter support and native Arrow transfer to build cross-database data pipelines for analytics workloads.

How do I run parameterized paginated queries with search filters in a Litestar project?

Parameterized paginated queries with ordering and search filters in a Litestar project are executed by configuring an asyncpg adapter, defining a typed dataclass model, and leveraging first-party framework plugins with built-in dependency injection.

Does sqlspec support bulk data ingest and Apache Arrow integration for analytics pipelines?

Yes, bulk data ingest and Apache Arrow integration are supported for analytics pipelines through a storage bridge and native ADBC integration, enabling efficient cross-database data transfer without ORM constraints.

What web frameworks have first-party plugin integrations for database connection lifecycle management?

First-party plugin integrations for database connection lifecycle management are available for Litestar, FastAPI, Starlette, and Flask, providing built-in dependency injection, commit modes, session stores, and filter dependencies.

When should I avoid using a traditional ORM for multi-database Python applications?

You should avoid a traditional ORM for multi-database Python applications when you require native database feature access like vector search and event channels, dialect-aware transpilation across 18+ adapters, or zero lock-in for analytics pipelines.