Skip to content

vnurhaqiqi/fastapi-sqlmodel-postgresql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI with SQLModel and PostgresSQL

Introduction

Example FastAPI with SQLModel by fouder itself, tiangolo, connected to PostgreSQL. As reference, this tutorial by Michael Herman about fastapi-sqlmodel and I made some tweaks from there.

Installment

clone the project

git clone https://github.com/vnurhaqiqi/fastapi-sqlmodel-postgresql.git

run virtual env

source /your-env/bin/activate -> Linux

your-env\Scripts\activate.bat -> Windows

migrate models using alembic

alembic upgrade head

run project using uvicorn

uvicorn main:app --reload

Copyright © 2021 by Viqi Nurhaqiqi

About

FastAPI using SQLModel connected to PostgreSQL

Topics

Resources

License

Stars

Watchers

Forks