r/FastAPI • • Jul 17 '22

Tutorial FastAPI starter template with SQLModel, Alembic and Pytest

Check out my FastAPI starter template with SQLModel, Alembic, Pytest. It also includes Docker and CI support.

https://github.com/mirzadelic/fastapi-starter-project/

Any feedback/PR is welcome.

25 Upvotes

8 comments sorted by

1

u/mmzeynalli Mar 09 '24

Is there any better method to autodetect all models without importing manually (or as you did, crawl and import)?

1

u/mirzadelic Mar 18 '24

1

u/mmzeynalli Mar 18 '24

I saw it, I just checked if there is better way.

1

u/coldflame563 Jul 18 '22

Why not use tiangolos that’s already built?

2

u/mirzadelic Jul 18 '22

In my case, I needed something really simple without Vue, Celery, etc. and I wanted to use SQLModel. That template that I was checking from tiangolo is really nice, but a bit old, last commit was Jan 5th, 2020.

I would like to see it upgraded to the latest versions, and use SQLModel.

1

u/beeyev Jul 18 '22

What is the best way to profile database queries? So I could see which db queries used during specific route?

1

u/Trinkes Jul 18 '22

You can check the database logs

1

u/Empty-Blacksmith-284 Nov 19 '23

I'm really happy about this, and I appreciate. This will save me a lot of time.

By the way, this is 2023, when should we start working on updating the libraries to their respective latest versions