FastAPI Best Practices Opinionated list of best practices and conventions I use in startups. For the last several years in production, we have been making good and bad decisions that impacted our developer exp
All files on static folder will be served by Caddy container as static files. You can check it with this link http://static.localhostMinio serverThis template allows users can upload their photos. The images are stored using the open source Object Storage Service (OSS) minio, which provides ...
Its object is one of the parameters for the mount() method of the FastAPI application object to assign "static" subfolder in the current application folder to store and serve all the static assets of the application.app.mount(app.mount("/static", StaticFiles(directory="static"), name="...
Store all domain directories inside src folder src/ - highest level of an app, contains common models, configs, and constants, etc. src/main.py - root of the project, which inits the FastAPI app Each package has its own router, schemas, models, etc. router.py - is a core of each...
1. Project Structure. Consistent & predictableThere are many ways to structure the project, but the best structure is a structure that is consistent, straightforward, and has no surprises.If looking at the project structure doesn't give you an idea of what the project is about, then the ...
FastAPI Best Practices Opinionated list of best practices and conventions I use in startups. For the last several years in production, we have been making good and bad decisions that impacted our developer experience dramatically. Some of them are worth sharing. Contents Project Structure Async...