Skip to content

Starter template for your FastAPI application with simple JWT authorization

License

Notifications You must be signed in to change notification settings

alexeykudimov/fastapi-app-template

Repository files navigation

⚡ Starter template for your FastAPI application with simple JWT authorization

🎯 Technologies

  • Python 3.11
  • FastAPI
  • Async SQLAlchemy 2.0
  • Async Alembic
  • Async Pytest

🎯 Environment

APP_NAME=<your app name>
APP_VERSION=<your app version>

SECRET_KEY=<your secret key>

DATABASE_URL=postgresql+asyncpg://<db_user>:<db_pass>@<db_host>:<db_port>/<db_name>
TEST_DATABASE_URL=postgresql+asyncpg://<db_user>:<db_pass>@<db_host>:<db_port>/<db_name>

🎯 Build

docker build -t server:latest .

🎯 Run

docker run -d -p 8000:8000 --name server --volume .:/app --env-file .env server:latest 

🎯 Migrate

docker exec -it server alembic upgrade heads

🎯 Tests

docker exec -it server pytest -v -s tests

🎯 Let's go!

http://localhost:8000/docs/

About

Starter template for your FastAPI application with simple JWT authorization

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published