FastAPI Template with JWT Authentication
- Python
- Poetry
- FastAPI
- SQLAlchemy v2
- Alembic
- Asyncpg
- PostgreSQL
- Pydantic v2
- Pytest
- Docker
- Docker Compose
You can check and open openapi.json in swagger editor or redoc
- Install packages with Poetry
make install
- Create
.env
file with the content from .env.example
cp .env.example .env
- Configure environment variables
Run in Docker
- Build and run the docker container
make
- Change
DATABASE_HOST
fromdatabase
tolocalhost
in.env
file - Startup PostgreSQL
make up-db
- Run migrations
make migrate
- Run
make run
to start app
make run
- Run tests
make test
- Run tests coverage
make cov
- Run linters
make lint
- Run formatters
make format