Installation#

Install SQLSpec with the Litestar extra and a database adapter.

uv add "sqlspec[asyncpg,litestar]"
pip install "sqlspec[asyncpg,litestar]"
poetry add "sqlspec[asyncpg,litestar]"
pdm add "sqlspec[asyncpg,litestar]"
uv add "sqlspec[psycopg,litestar]"
pip install "sqlspec[psycopg,litestar]"
poetry add "sqlspec[psycopg,litestar]"
pdm add "sqlspec[psycopg,litestar]"
uv add "sqlspec[aiosqlite,litestar]"
pip install "sqlspec[aiosqlite,litestar]"
poetry add "sqlspec[aiosqlite,litestar]"
pdm add "sqlspec[aiosqlite,litestar]"
uv add "sqlspec[asyncmy,litestar]"
pip install "sqlspec[asyncmy,litestar]"
poetry add "sqlspec[asyncmy,litestar]"
pdm add "sqlspec[asyncmy,litestar]"

Requirements#

  • Python 3.11+

  • Litestar 2.23+

  • A compatible database adapter (async recommended for web request concurrency)

Next Steps#

Proceed to Quickstart to wire the plugin into your Litestar app.