Jaironlanda / fastapi-async

Basic CRUD Async/Await with SQLAlchemy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fastapi Boilerplate

Basic CRUD for (FastAPI + Pydantic + SQLalchemy Postgresql)

Requirements

fastapi==0.79.0
pydantic==1.9.2
uvicorn==0.18.2
alembic==1.8.1
python-dotenv==0.19.2
sqlalchemy==1.4.35
databases==0.6.1
# sqlmodel==0.0.6
asyncpg==0.26.0
pytz==2022.1
ua_parser==0.15.0

Docker Setup

docker compose up

Init Migrations

alembic init migrations

Autogenerate Migrations

alembic revision --autogenerate -m "init"
alembic upgrade head

Create DB

alembic upgrade head

Docker Exec

docker exec -w /myapp/app/v1 51fa0bf13ee3 alembic upgrade head

About

Basic CRUD Async/Await with SQLAlchemy


Languages

Language:Python 92.2%Language:Mako 3.8%Language:Dockerfile 2.9%Language:Shell 1.1%