---
title: "💭 4 Tips for Building a Production-Ready FastAPI Backend - YouTube"
description: "!https://www.youtube.com/watch?v=XlnmN4BfCxw"
date: 2024-12-26
published: true
tags:
  - python
  - fastapi
  - webdev
  - thought
template: link
---


<div class="embed-card embed-card-external embed-card-provider-youtube">
  <div class="embed-card-rich">
<lite-youtube videoid="XlnmN4BfCxw" title="How I Actually Build FastAPI Backends for Production" playlabel="Play: How I Actually Build FastAPI Backends for Production"></lite-youtube>
  </div>
</div>


Great list of 4 tips for running fastapi applications.  

## Keep routes small

Fat routers with all of the logic built in makes them hard to test, hard to refactor, causes lots of duplication, and makes it hard to reuse the business logic code later in something like a cli application.

## Deploy Early

I really like this advice!  He reccommends deploying as early as you can get a healthcheck live in your application.  I've found too many times developers build something that is really hard, or impossible to deploy, when if they had tried to deploy early they would have spotted some easy to fix issues.  This is less important if you are building out of a template that your team commonly deploys from, but very important with new patterns.

https://youtu.be/XlnmN4BfCxw?si=ks1wvmgDyoQLgrv2&t=1093


!!! note

    This post is a <a href="/thoughts/" class="wikilink" data-title="Thoughts" data-description="These are generally my thoughts on a web page or some sort of url, except a rare few don&#39;t have a link. These are dual published off of my..." data-date="2024-04-01">thought</a>. It's a short note that I make
    about someone else's content online <a href="/tags/thoughts/" class="hashtag-tag" data-tag="thoughts" data-count=2 data-reading-time=3 data-reading-time-text="3 minutes">#thoughts</a>
