I am looking to understand and hopefully learn something as to how FastAPI ended up gaining so much popularity within a relatively short time. Is there a lesson to be learned that other open source projects can implement as well. It’s actually a genuine question that I want to find answers to. Thank you!
It was the first api library I encountered that was built on/for Python3 optional types and Pydantic, which really gave it a lever for generating schema and validation from a model class and It Just Worked. It also supported async, and there was tooling around it early for shoving it into a lambda function. Well written and well documented, and well abstracted (Starlette, Strawberry etc).<p>I had spent the last 5-10 years building Django and django-rest-framework applications, and the amount of yak shaving with Serializers and Viewsets was really annoying. Bonus points to FastAPI is it didn’t try to own every layer, by providing an ORM like Django, which is great for a small app or if you really really love Django, but as we scaled and had to cascade every field change through seventeen layers from Table to Template it became a real burden. Not all djangos fault of course.<p>FastAPI was a breath of fresh air, somewhere between Django and Flask on modern kit. I was able to PoC something fairly complicated that ran on serverless components in a weekend. Its still running in production years later.
Define "a short time." It's been in development for many many years, it didn't pop up out of nowhere like many AI open source tools.<p>It's solid with good documentation and does what's necessary.