FastAPI + SQLModel + Alembic
July 10, 2023 ยท View on GitHub
Sample FastAPI project that uses async SQLAlchemy, SQLModel, Postgres, Alembic, and Docker.
Want to learn how to build this?
Check out the post.
Want to use this project?
$ docker-compose up -d --build
$ docker-compose exec web alembic upgrade head
Sanity check: http://localhost:8004/ping
Add a song:
$ curl -d '{"name":"Midnight Fit", "artist":"Mogwai", "year":"2021"}' -H "Content-Type: application/json" -X POST http://localhost:8004/songs
Get all songs: http://localhost:8004/songs