3 ms·
Molten also helped inspire parts of FastAPI. And they are indeed quite similar in several things. Molten is based on WSGI, FastAPI is based on ASGI. So, you c
by tiangolo 8y ago
Molten also helped inspire parts of FastAPI. And they are indeed quite similar in several things.
Molten is based on WSGI, FastAPI is based on ASGI.
So, you can do async/await stuff in FastAPI.
FastAPI inherits directly form Starlette, so it inherits its benefits, like testing tools, GraphQL in-process background tasks, etc.
And it benefits from the ASGI ecosystem, for example with plugins to handle Django-Channels like Websockets, deployment to "serverless", even including other tools like Socket-IO.
FastAPI is based on Pydantic instead of an internal library for declaring schemas, so any improvements there are inherited here.
It supports Flask like route decorators.
The dependency injection is simpler, probably more intuitive (but this is more subjective). The same with several other parts.
But again, Molten is a great tool, and was one of the tools that inspired FastAPI (it's even mentioned in the docs).