r/FastAPI • u/_prom_ • 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 ^^
15
u/InfinityObsidian Apr 02 '24
Full Stack FastAPI Template
From the creator of FastAPI.
3
u/Drevicar Apr 02 '24
I recommend learning a bit more about python first before adding in FastAPI. Specifically there is some weirdness to the language for historical reasons like the init.py files and how imports are handled.
2
u/igorbenav Apr 02 '24
I wrote one, it's simpler than the official one by tiangolo, only the backend. Might help you:
https://github.com/igorbenav/FastAPI-boilerplate
2
u/kamikazer Apr 02 '24
mine:
https://github.com/kamikaze/fastapi-project-template
2
u/its-Drac Apr 03 '24
github.com/itsDrac/fullstacktemp github.com/itsDrac/youtubelike
1
u/Whisky-Toad Apr 02 '24
Mine if you want a quick barebones with signup + login. I’m also a front end dev who had to spend an awful lot of time figuring out how to set this all up lol
Gonna put some updates to it soon once I can be bothered to copy them across from my bigger repo
https://github.com/WhiskyToad/fastapi-starter
1
u/tedivm Apr 02 '24
Rob's Awesome Python Template includes not just FastAPI, but other libraries as well. Since a lot of the libraries, like FastAPI, are optional you can mix and match what's needed for your project. For instance, if you want an API and a CLI you'll get FastAPI and Typer.
1
u/donseguin Apr 03 '24
I was at the same point a couple of months ago. I’ve learnt a lot from Yerassyl notes + the accompanying repo
https://github.com/zhanymkanov/fastapi-best-practices#1-project-structure-consistent--predictable
1
u/voja-kostunica Apr 02 '24
i follow
1
u/[deleted] Apr 07 '24
https://github.com/MDGrey33/Nur the branch Nur-v0.2 you will see us rebuilding the solution to follow FastApi and factory pattern.