You picked FastAPI. Now every database call feels like a guess.
You know async can help when the server waits on Postgres. You also know one blocking call in the wrong place can stall everything. Official docs explain the idea. They do not hand you two working styles side by side, with tests that prove both paths.
FastAPI Sync Async Starter Template is the clone-and-compare starting point.
See both database styles working before you bet the whole API on one.
What you get
- Side-by-side sync and async routes. Call examples that show when each style fits, with matching session setup you can copy into your own endpoints.
- A database layer you can trust while learning. Type-checked models and schemas sit next to the routes so you see how data flows in both modes.
- Tests that cover async endpoints. An async-friendly test setup runs with coverage and saves HTML reports you can open in a browser.
- Containers for the API, Postgres, and rate limiting. One compose flow brings up the stack, runs tests in a separate stage, and keeps dev and production-like images apart.
- Rate limits you can tune per environment. Examples cover basic limits, shared caps, burst rules, and slow routes, with shared storage in production-like settings and a lighter mode for tests.
- Free and open source. MIT licensed. Dependency versions are locked for repeatable installs.
Your first morning after cloning
Picture Monday. You pull the repo, start the compose stack, and open the interactive API docs in the browser. You hit a sync route and an async route against the same Postgres data. You run the full test suite and open the coverage report to see what you still need to wire. By lunch you are extending routers, not fighting session setup.
Prefer a walkthrough first?
The project includes a short video tour of the layout and how the pieces fit together.
Ready to try it?
- Get the template on GitHub for setup steps, sample reports, and the full project layout
- See it on Product Hunt












