Skip to content

YuriFontella/litestar-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Litestar Auth

1. Prerequisites

  • Python 3.13+
  • Poetry (dependency manager)

Poetry installation (if you don't have it):

curl -sSL https://install.python-poetry.org | python3 -

2. Environment variables (.env)

Copy the .env.example file to .env and change the values as needed:

cp .env.example .env

3. Install dependencies

poetry install

Install the shell plugin and activate the virtual shell:

poetry self add poetry-plugin-shell
poetry shell

Configure pre-commit hooks:

pre-commit install --config pre-commit.yaml

4. Database

Create the database (adjust the name according to your DSN):

createdb db

Apply manual SQL migrations (e.g.: content in src/db/migrations/).

5. Run the server

Basic command:

litestar run

Examples with options:

litestar run -r -P -d -p 9000 -H 0.0.0.0
litestar run --wc 4
litestar run -h

6. OpenAPI / ReDoc

Access 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 --latest

More features: litestar-asyncpg

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages