- Python 3.13+
- Poetry (dependency manager)
Poetry installation (if you don't have it):
curl -sSL https://install.python-poetry.org | python3 -Copy the .env.example file to .env and change the values as needed:
cp .env.example .envpoetry installInstall the shell plugin and activate the virtual shell:
poetry self add poetry-plugin-shell
poetry shellConfigure pre-commit hooks:
pre-commit install --config pre-commit.yamlCreate the database (adjust the name according to your DSN):
createdb dbApply manual SQL migrations (e.g.: content in src/db/migrations/).
Basic command:
litestar runExamples with options:
litestar run -r -P -d -p 9000 -H 0.0.0.0
litestar run --wc 4
litestar run -hAccess at:
http://localhost:PORT/schema/redoc
Replace PORT with the port used (default 8000 if not specified).
Extra plugin for Poetry
poetry self add poetry-plugin-up
poetry up --latestMore features: litestar-asyncpg