Learnings from migrating a Flask app to FastAPI

Orell Garten

Building HTTP APIs has become a normal part of the work as a software or data engineer within the last 10 to 15 years. In the Python ecosystem Flask was the only option to build an HTTP API for many years. After its initial release in 2018 FastAPI quickly became a serious alternative to build such APIs with Python.

In this talk I will share my experiences from migrating an existing HTTP API built with flask to a FastAPI-based API.

We will discuss the following topics:

  • Why did we migrate at all?
  • Modeling data for input and output
  • Async is overrated
  • The different ecosystems and why it doesn't matter
  • Problems you will encounter

The talk will show you the practical differences between developing APIs with FastAPI or Flask.

Orell Garten

Freelance Software and Data Engineer. I love building data systems of any kind while my main focus is on backend engineering.