r/FastAPI • • May 20 '23

Other Fastapi minimal starter template

Hi everyone,

I found myself rebuilding a lot of basic stuff such as sign up, login, async database functionality and unit tests every time I wanted to quickly POC something. Now I like to keep things simple and customisable when starting and thus usually don't opt for using one of the already existing templates (such as this great generator: https://github.com/s3rius/FastAPI-template) since I feel I spend more time cutting stuff out I don't need.

So, I've put together a minimal starter template that tries to do just the basics and stay out of your way. Included functionalities are:

  • Minimal Fastapi app

  • Async/Await Functionality

  • JWT based OAuth security on a per endpoint basis

  • Unit tests

  • Type hints

  • Basic Database Functionality Included (SQLite3)

  • Support for .env

I figured this also might be useful for others, so I wanted to share it here! You can find the repo here:

https://github.com/StefanVDWeide/fastapi-api-template

34 Upvotes

5 comments sorted by

3

u/thegainsfairy May 20 '23

awesome! I've been needing a good MVP template

3

u/SilentCabinet2700 May 20 '23

Thanks for sharing

3

u/saitamaxmadara May 20 '23

Thanks for sharing

I had to cut a lot of stuff whenever I start fastapi project too

1

u/rad1c4l Aug 05 '24

Hey thanks for this

How do you run it?

1

u/[deleted] May 25 '23

Thanks, cool!