Python frameworks to watch in 2022
There have been many popular python frameworks. Flask and Django being the most popular of the lot. This is changing. There seem to be a couple of frameworks with a promising and interesting approach.
FastAPI
A lot has been written about FastAPI vs Flask vs Django as python frameworks for modern API Driven microservices or web development. Let us look at some of the reasons which may make FastAPI a better choice
Reduced size typically is preferable as it means reduced load time and reduced cost esp. when deployed as AWS Lambda.
2. Performance
3. Developer Productivity:
领英推荐
Japronto
Disclaimer: Haven't used it just read about the performance it delivers with respect to microservices in #GoLang. Refer: Million requests/sec with Python
Performance is always relative. Also deployment matters a lot. So writing a lot of high performance concurrent code but running it in single CPU containers/lambdas may not always give desired results. One approach is to prefer productivity over performance as it can help deliver products faster to market. With this approach, optimisations can always be done later and helps avoid pre-mature performance optimisations and over-engineering the system design/components than really needed for intended performance or cost. Although better performance is always appreciated to begin with choose correct evaluation parameters and framework matters as these are costly to change later.
Japronto looks promising at least on paper. (Refer: Image below, courtesy JaPronto)
It seems the reasons for this performance mainly are
However, it is still in alpha and its GitHub repo itself recommends to use sanic. It is also claimed that certain http servers in Go give performance closer to Japronto. However considering developer productivity even if performance is equitable Japronto will have an edge in python, unless of course the open source project remains un-maintained. Repo seems to have not been updated in last 2 years. Although Github 'issues', 'likes' and 'forks' tell different story. Japronto seems like worthwhile approach at least on paper.
Anything else upcoming/interesting in Python world? Please feel free to share your thoughts in comments below.