Skip to content

Sample FastAPI project that uses async SQLAlchemy, SQLModel, Postgres, Alembic, and Docker.

License

Notifications You must be signed in to change notification settings

jonra1993/fastapi-sqlmodel-alembic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI SQLModel Alembic

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

Want to make a migration?

$ docker-compose exec web alembic revision --autogenerate
$ 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

About

Sample FastAPI project that uses async SQLAlchemy, SQLModel, Postgres, Alembic, and Docker.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.4%
  • Mako 6.2%
  • Dockerfile 5.4%