3 ms·
How does this compare to https://moltenframework.com/ https://moltenframework.com/? They both provide type hints and are inspired by API Star. Why should I use
by qb 8y ago
How does this compare to https://moltenframework.com/ https://moltenframework.com/? They both provide type hints and are inspired by API Star. Why should I use FastAPI over molten?
- tiangolo 8y agoMolten 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).