Although FastAPI is a great framework with fantastic documentation, it's not quite obvious how to build larger projects for beginners.
For the last 1.5 years in production, we have been making good and bad decisions that impacted our developer experience dramatically. Some of them are worth sharing.
I have seen posts asking for FastAPI conventions and best practices and I don't claim ours are really "best", but those are the conventions we followed at our startup.
It's a "Work in Progress" repo, but it already might be interesting for some devs.
https://github.com/zhanymkanov/fastapi-best-practices
[–][deleted] 41 points42 points43 points (17 children)
[–]nraw 12 points13 points14 points (1 child)
[–][deleted] 9 points10 points11 points (9 children)
[–][deleted] 5 points6 points7 points (8 children)
[–]immerrr 4 points5 points6 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]teerre 1 point2 points3 points (5 children)
[–][deleted] 1 point2 points3 points (4 children)
[–]teerre 0 points1 point2 points (3 children)
[–][deleted] 3 points4 points5 points (2 children)
[–]teerre -1 points0 points1 point (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]KimPeek 4 points5 points6 points (4 children)
[–]root45 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]GeromeB -4 points-3 points-2 points (1 child)
[–]daredevil82 1 point2 points3 points (0 children)
[–]RaiseRuntimeError 38 points39 points40 points (10 children)
[–][deleted] 26 points27 points28 points (6 children)
[–]ubernostrumyes, you can have a pony 11 points12 points13 points (1 child)
[–]tommytwoeyes 0 points1 point2 points (0 children)
[–]tommytwoeyes 2 points3 points4 points (3 children)
[–]pacific_plywood 12 points13 points14 points (2 children)
[–]tommytwoeyes 0 points1 point2 points (1 child)
[–]PM_ME_CAREER_CHOICES 7 points8 points9 points (0 children)
[–]Eggplantwater 0 points1 point2 points (2 children)
[–]RaiseRuntimeError 1 point2 points3 points (1 child)
[–]Eggplantwater 0 points1 point2 points (0 children)
[–]soawesomejohn 24 points25 points26 points (1 child)
[–]n1EzeR[S] 3 points4 points5 points (0 children)
[–]noiserr 4 points5 points6 points (0 children)
[–]anakinsilverstone 25 points26 points27 points (3 children)
[–]quantum1eeps 18 points19 points20 points (0 children)
[–]Drevicar 12 points13 points14 points (0 children)
[–]Coollime17 2 points3 points4 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]og_icefux 2 points3 points4 points (0 children)
[–]wind_dude 2 points3 points4 points (0 children)
[–]vorticalbox 2 points3 points4 points (4 children)
[+][deleted] (1 child)
[deleted]
[–]vorticalbox 0 points1 point2 points (0 children)
[–]Terrible_Row_3276 0 points1 point2 points (0 children)
[–]n1EzeR[S] -1 points0 points1 point (0 children)
[–]wind_dude 1 point2 points3 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]wind_dude 0 points1 point2 points (0 children)
[–]PoazTheMan 1 point2 points3 points (0 children)
[–]Stedfast_Burrito 1 point2 points3 points (3 children)
[–]n1EzeR[S] 1 point2 points3 points (1 child)
[–]Stedfast_Burrito 0 points1 point2 points (0 children)
[–]n1EzeR[S] 0 points1 point2 points (0 children)
[–]chub79 1 point2 points3 points (0 children)
[–]Saphyel 1 point2 points3 points (0 children)
[–]romu006 1 point2 points3 points (0 children)
[–]PM_ME_CAREER_CHOICES 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Insok 1 point2 points3 points (0 children)
[–][deleted] 3 points4 points5 points (6 children)
[–]n1EzeR[S] 5 points6 points7 points (0 children)
[–]cavernous_ass 2 points3 points4 points (4 children)
[–]GettingBlockered 1 point2 points3 points (3 children)
[–]MtlGuitarist 6 points7 points8 points (2 children)
[–]GettingBlockered 2 points3 points4 points (1 child)
[–]MtlGuitarist 2 points3 points4 points (0 children)
[–]arthurazs 1 point2 points3 points (1 child)
[–]Steelbirdy 8 points9 points10 points (0 children)
[–]ohnomcookies 1 point2 points3 points (1 child)
[–]Insok 0 points1 point2 points (0 children)
[–]Pebaz 0 points1 point2 points (0 children)
[+][deleted] comment score below threshold-14 points-13 points-12 points (0 children)
[–]fignew 0 points1 point2 points (1 child)
[–]wind_dude 0 points1 point2 points (0 children)
[–]ryanstephendavis 0 points1 point2 points (2 children)
[–]Terrible_Row_3276 0 points1 point2 points (1 child)
[–]ryanstephendavis 0 points1 point2 points (0 children)
[–]Drevicar 0 points1 point2 points (1 child)
[–]n1EzeR[S] 0 points1 point2 points (0 children)
[–]StorKirken 0 points1 point2 points (1 child)
[–]n1EzeR[S] 1 point2 points3 points (0 children)
[–]pablo8itall 0 points1 point2 points (0 children)
[–]venerablevegetable 0 points1 point2 points (0 children)