Fast API: Create your API fast

Fast API is a Python web framework for building APIs. It has positioned itself as one of the fastest API-building frameworks in the market. I didn’t learn about it when I was in college; I was using the Django Rest Framework. Later, I was introduced to FastAPI via a YouTube tutorial.

Now the question arises, Why FastAPI? Why do I need to learn one more framework just to develop another API that will only do the read?

The answer is you don’t have to if you don’t want to. But if you want to try something different and make your API a little faster, I think you should learn FastAPI. 

 

Why Fast API?

1. Faster: Because of Pydantic and Starlette, FastApi has become one of the fastest frameworks for developing API. You can use Async and Await syntax to make your API faster and more efficient.

  1. Fast to learn: FastAPI is a Python framework that is very beginner-friendly. It is easy to learn to make APIs, and I think getting early wins is important when you are learning something. If you are a beginner, you will not make crazy-fast APIs because you are using FastAPI. You still need to learn the best practices and know how to use the perks of FastAPI.
  2. Fewer Bugs: FastAPI creates fewer bugs in your code as it helps you with:
  • Data Validation
  • Automatic Documentation
  • Built-in Error Handling
  • Built-in Dependency Injection
  • Tooling Support(mypy)

 

Is there any Downside to Fast API then?

 

Yes, actually a couple of them. Those are:

  • Learning to use Async properly: It is a tool if you don’t know how to use it can be a problem for beginners. 
  • Limited Built-in Features: Though it has some good built-in features which we discussed earlier, it also missing a lot of them if you compare it with Django. Django has admin interfaces, ORM, and authentication features, which FastAPI misses. FastAPI only focuses on API development and that can justify the reasons for not having those.
  • Poor Support Ecosystem: FastAPI does not have a big support system or community. Most of the commits are from Sebastián Ramírez(tangelo) who is the creator of the FastAPI

So, these is some points you need to know before you want to learn FastAPI. 

 

The best time to start developing yourself is now. Stay focused, and stay consistent.

Blog Categories

Similar Blog