r/FastAPI • • Apr 02 '24

Question Request for sample fastAPI projects github repos

Hi everyone

I am new to fastAPI & python, coming from the frontend side of the world and nodejs. I was hoping this community could link me through their past/present fastAPI projects where there is a proper db connection, directory structure etc. The basic stuff. I am tired of googling for blogs and not getting what I want.

Until now, I haven't been able to figure out any common pattern on directory structure, or connection using MySQL, Postgres etc. Some things I am importing from sqlmodel and some from sqlalchemy..

Idk... i am super confused and idk what I am talking about. I just need some good project links from where I can learn and not some blogs that university students wrote (sorry not trying to insult anyone, it's my frustration) Thanks ^^

19 Upvotes

30 comments sorted by

View all comments

Show parent comment

2

u/_prom_ Apr 02 '24

You are correct however, I will pick these things up on my way learning on to building an api

4

u/Drevicar Apr 02 '24

Fair enough, best of luck to you then!

And I feel you on the unqualified blog posts. I feel like so many students or recent graduates can't get their first dev job so they become career medium bloggers just spreading misinformation or bad advice.

Also, my personal favorite production FastAPI repo is https://github.com/Netflix/dispatch though it isn't using using all the flashy cool new features available in modern FastAPI.

1

u/_prom_ Apr 02 '24

Thanks alot, I need that luck. Yes you are right, I wasn't insulting the students, its just everywhere the quality of blogs isn't upto the mark and I ended up wasting alot of time.

I am not aware of what does this repo does, I will have a look at it and learn if I can find something useful to my usecase. Thanks again 😊

2

u/Drevicar Apr 02 '24

I'm insulting the students, not you.

The repo is a production-grade application written using FastAPI and I really like the vertical slice architecture present in their file structure and use of FastAPI. Specifically you have a single file where you combine all your routers into a single "FastAPI Application", but each "domain" within the application has its own router and doesn't need to be concerned about the rest of the application.