Production Ready FastAPI Application From 0 to 1 [Part-1]

Mohit
2 min readNov 4, 2022

--

What is FastAPI?

FastAPI is a modern and fast web framework for building APIs.

Why FastAPI?

  • Speed: FastAPI is one of the fastest emerging Python web frameworks. The performance is at par with Node.js and Go. Performance tests are captured here).
  • Faster coding time: You can code fast using this framework. It has so many inbuilt tools that make the life of developers easy. A few examples are type hints, data validation, etc.
  • Simple: It is easy to use and has excellent developer documentation.

Tech Companies using FastAPI

A quick background about Phyllo

Phyllo is a data gateway to access creator data from hundreds of source platforms like YouTube, Twitter, TikTok, Substack, Discord, Twitch, OpenSea, Shopify, and others. It builds the underlying infrastructure that connects to every creator platform and maintains a live data feed to the systems used by these platforms. We manage the creator’s data and provide a first-party normalized data set using APIs.

FastAPI: A warrior

Phyllo serves approximately 10 million public API calls daily, with very low latency and negligible failure rates. We are heavily invested in FastAPI and using it efficiently to build our microservices.

When we started last year, things were not smooth. We too made mistakes. Eventually, we learned how to utilize FastAPI better and organize the rapidly growing project. We can proudly say that we have adopted the best practices during this journey and want to share the learning with everyone.

We want to share our knowledge related to FastAPI and benefit the community.

  • How to efficiently build an application using FastAPI?
  • How to bring production-grade quality to the code?
  • How to structure the code in your FastAPI application? If you don’t do this properly, you might face multiple issues once the project grows.

Please check Part 2 of the series where we are covering the below functionalities.

  • Setting up a development environment.
  • Create a simple “Hello world” project.
  • Running this project using an async web server.
  • Visualize the beautiful inbuilt API documentation.

Here is a quick link to articles from this series:

If this article is helpful, follow me to see my next articles.

--

--

Mohit

Founder @Stealth | Prev @Co-Founder @getphyllo.com