News for hackers. Stuff that matters.
Re:Show HN: FastAPI: build Python APIs with Go-like speed an... by tiangolo on Thursday March 21, 2019 @11:26AM (#19453409)
About reinventing the wheel, let me copy my answer from Reddit:

Good question. I ask the same questions myself every time. And I avoided creating FastAPI for a long time.

I tried a whole lot of tools. And FastAPI got inspiration from a lot of them.

A more detailed explanation is here: https://fastapi.tiangolo.com/alternatives/

More details about Flask and Django:

About Flask:

I created the mosts popular Docker images for Flask. I've been building APIs with Flask for a long time, with several teams, using many of its plug-ins, etc. All that learning was inherited by FastAPI. To reduce development time and effort.

About Django:

If you are building APIs with Django, chances are you are using Django-REST-Framework. It was built by Tom Christie. He then built APIStar, improving over what Django-REST-Framework could do. Then he had to stop building APIStar to dedicate himself to Starlette, the new super-fast microframework. FastAPI is heavily inspired by APIStar, and based on Starlette. And uses Python type hints even more.

About plug-ins:

If you refer to plugins to do: authentication, data validation, data serialization, documentation, automatic API docs, compatibility with all SQL and NoSQL, dependency injection, Websockets, Testing, GraphQL... it's all included. Even though it's a mini-framework. Most of the functionality that is normally achieved with plugins is included.

Also, it's heavily integrated into the ASGI ecosystem, so, you have plug-ins to handle Django-Channels like Websockets, serverless deployments, Socket-IO, etc.

Give it from 5 to 20 minutes. That's enough to decide if you like it or hate it.

There are no comments on this comment yet.