Litestar Integration

SQLSpec ships a Litestar plugin that wires database configs into the app lifecycle, dependency injection, and transactional hooks.

Choose a guide

Installation

Install the plugin and wire it into your Litestar app.

Installation
Quickstart

A fast path from configuration to your first request.

Quickstart
Dependency Injection

Bind sessions to handlers with explicit keys.

Dependency Injection
Transactions

Use context-aware commit and rollback flows.

Transactions
Session Stores

Persist Litestar session state with SQLSpec stores.

Session Stores
API Reference

Detailed plugin configuration and hooks.

API