/fastapi-sqlmodel

Basic application with FastAPI, SQLModel and PostgreSQL

Primary LanguagePython

FastAPI and SQLModel

SQLModel docs

Official github tutorials

Install dependencies

pipenv install

Run app

Note: Postgresql should be runnging. See the Postgresql section.

  • Option 1:
pipenv run uvicorn main:app --reload
  • Option 2:
pipenv shell

uvicorn main:app --reload

Postgresql

  • Option 1: recomended
docker-compose up -d
  • Option2:
docker run --name postgres -e POSTGRES_PASSWORD=postgres -d postgres

TODO

  • Modularize all app
  • Make async db
  • Make async endpoints

Docs used

SQLModel

  1. SQLModel Teams

Github