Introducing
The Slant team built an AI & it’s awesome
Find the best product instantly
Add to Chrome
Add to Edge
Add to Firefox
Add to Opera
Add to Brave
Add to Safari
Try it now
4.7 star rating
0
Development
What are the best Python microframeworks?
10
Options
Considered
152
User
Recs.
Dec 15, 2023
Last
Updated
Related Questions
Activity
Have feedback or ideas?
Join our community
on Discord
Ad
10
Options
Considered
Best Python microframeworks
Price
Written in
License
73
Flask
-
Python
BSD License
--
FastAPI
0
Python
MIT
--
Bottle
-
-
-
--
CherryPy
-
-
-
--
Pyramid
-
Python
-
See Full List
73
Flask
My Rec
ommendation
for
Flask
My Recommendation for
Flask
All
14
Pros
9
Cons
4
Specs
Top
Pro
•••
Minimalist without losing power
Flask is very easy to get up and going, with vanilla HTML or with bootstrap pieces. It doesn't take much lines of python to load Flask to get headers working, etc, and since it's all modular you don't have to have something you don't want in your application. Each module within Flask works very well, and is extremely good on bandwidth and CPU usage.
See More
Top
Con
•••
HTML-oriented, not API-oriented
Not necessarily designed for making APIs, though that is possible
See More
Specs
Written in:
Python
License:
BSD License
Top
Pro
•••
Simple to use
With only a few lines of code, you can have a very simple site up and running.
See More
Top
Con
•••
Setting up a large project requires some previous knowledge of the framework
Setting up a large project with Flask is not that easy considering how there's no "official" way of doing it. Blueprints are a useful tool in this regard but require some additional reading and are a bit tricky to get right for a beginner. The lack of some defaults can also be problematic. Having to choose between different libraries for a certain task is never easy, especially if you have never worked with Flask before.
See More
Top
Pro
•••
Very flexible
The choice of not having an ORM, but instead choosing one suited to the task, gives developers who use Flask a great deal of flexibility. Another area where Flask gives a lot of options to developers is the templating. They can use Jinja2, Flask's default templating language or choose from a number of different templating languages they desire.
See More
Top
Con
•••
Not async-friendly
Flask is explicitly not designed to handle async programming.
See More
Top
Pro
•••
Great documentation
The official documentation is very good. Every aspect of the framework is discussed and explained in depth in a way that even a beginner may easily understand.
See More
Top
Con
•••
Threadlocals and globals used everywhere
The default way of creating applications in flask makes it hard to use reusable and clean code.
See More
Top
Pro
•••
Lots of plugins
Minimal frameworks usually give the developer a lot of space and flexibility. But with that comes the responsibility of having to code every part of the application yourself, if you get stuck somewhere you are on your own usually. Fortunately, this is not the case for Flask. Because it's very popular and as a relatively large following there are a lot of third-party libraries and plugins available for it. So if you want to save time or if you don't know how to solve a particular problem chances are that someone has already made a library for that.
See More
Top
Pro
•••
Able to use ORM or "true SQL"
See More
Top
Pro
•••
Lots of resources available online
Flask is one of the most popular Python web frameworks, if not the most popular one. As such, there's plenty of guides, tutorials, and libraries available for it. A large number of important Python libraries, such as SQLAlchemy have libraries for Flask, which add valuable bindings to make the development process and the integration between these libraries and Flask as easy as possible.
See More
Top
Pro
•••
Large community
Very large community, largest of all the Python micro-frameworks.
See More
Top
Pro
•••
Extremely easy to build a quick prototype
Even though it's pretty minimalistic out of the box, Flask still provides the necessary tools to build a quick prototype for a web app right after a fresh install. With all the main components pretty much packed in the flask package, building a simple web app in a single Python file is as easy as it gets.
See More
Hide
See All
Get it
here
Recommend
55
1
--
FastAPI
My Rec
ommendation
for
FastAPI
My Recommendation for
FastAPI
All
20
Experiences
2
Pros
16
Cons
1
Specs
Top
Pro
•••
Editor completion
It is based on Python type declarations, so, editors and tools can give great support. Including type checks and autocompletion everywhere.
See More
Top
Con
•••
Smaller community
Since FastAPI is relatively new, its community is smaller than Django Rest Framework.
See More
HumbleXmucane's Experience
Truly fast! Asynchronous included, Swagger included.
See More
Specs
Written in:
Python
Platforms:
Cross-platform
License:
MIT
Default ORM:
SqlAlchemy
See All Specs
Top
Pro
•••
Automatic docs
It generates interactive API documentation automatically from your code.
See More
ReveredPsyche's Experience
one of the best frameworks out there better than flask and tornado with a good margin easy to start with , amazing features , super fast (Async) , great documentation
See More
Top
Pro
•••
Dependency injection
It has a simple but powerful dependency injection system, it can be used to handle authentication, per-user rate limiting, authorization controls (e.g. with roles), etc.
See More
Top
Pro
•••
World class documentation
It has some of the best documentation of any framework.
See More
Top
Pro
•••
Database independent
It's independent of database or ORM, but compatible with all of them. Including relational databases and NoSQL.
See More
Top
Pro
•••
OAuth 2.0
It has integrated support for OAuth 2.0. Including declaring required scopes per endpoint. So, you can easily integrate it with external OAuth 2.0 providers or build your own with it.
See More
Top
Pro
•••
Standards
It is based on standards: OpenAPI, JSON Schema and OAuth 2.0.
See More
Top
Pro
•••
High-performance
It's based on Starlette and Pydantic, so, it's one of the fastest Python frameworks.
See More
Top
Pro
•••
Data validation
It validates the data using the types you declared. Even in deeply nested JSON requests.
See More
Top
Pro
•••
WebSockets
Because it's an async framework, it can handle async-native protocols like WebSockets.
See More
Top
Pro
•••
Async IO / optional
It's based on Async IO, which gives it high concurrency. But you can use non-async libraries and it runs them appropriately.
See More
Top
Pro
•••
Background tasks
Included support for background tasks, thanks to being based on Starlette.
See More
Top
Pro
•••
One of the fastest growing communities
See More
Top
Pro
•••
graphql out of the box
See More
Top
Pro
•••
Supports GraphQL
Python's graphene library is included as an optional dependency meaning that GraphQL API's are supported out of the box, with no additional tweaking needed.
See More
Top
Pro
•••
Really fast
It's easy to develop API based applications in Python on deadlines for Android and IOS Development.
See More
Hide
See All
0
Recommend
18
1
--
Bottle
My Rec
ommendation
for
Bottle
My Recommendation for
Bottle
All
7
Pros
5
Cons
2
Top
Pro
•••
Flexible
Being a small one file distribution it includes almost every vital thing you need to support little websites (routing, templating). Everything else can be implemented using plugins.
See More
Top
Con
•••
Small community. Difficult to find online docs and examples
See More
Top
Pro
•••
Single-file distribution
Bottle works around the one-file approach, everything is done in a bottle.py file. This means that it's extremely easy to share and upload your application since it practically is just one python file.
See More
Top
Con
•••
Very hard to develop projects that are not smaller than 1000 lines
While Bottle is a great framework for building small applications (generally less than 1000 lines of code), it starts getting very hard to manage your application if you want to go even a bit larger than that. The fact that it follows a single-file distribution model and that it's missing something like Flask's blueprints only make this problem worse.
See More
Top
Pro
•••
No need to install
It is so little there's no need to install, it is included in the standard libs python.
See More
Top
Pro
•••
Async, *let friendly 
Using it with gevent is a breeze. It's a WSGI app so it's easy to make it work with anything.
See More
Top
Pro
•••
Truly magnificent
See More
Hide
See All
Get it
here
Recommend
24
2
--
CherryPy
My Rec
ommendation
for
CherryPy
My Recommendation for
CherryPy
All
5
Experiences
1
Pros
3
Cons
1
Top
Pro
•••
Robust configuration mechanism
It's very easy to choose what processes you want by turning them on or off. You can also configure per-URL as well.
See More
Top
Con
•••
Lacking good documentation
CherryPy's documentation could use some work. It generally feels very slim and is seriously lacking in some parts. For a beginner who is just starting with Python Frameworks, working with CherryPy's documentation would be very hard.
See More
ConscientiousPundjel's Experience
Very easy to spinup small web application or APIs.
See More
Top
Pro
•••
Has production-ready server
Comes with a production level wsgi server that can be used instead of / in addition to gunicorn etc.
See More
Top
Pro
•••
Helps you organize the structure of your code
CherryPy provides some dispatcher patterns that support a wide range of functionality and provide some helpful ways of organizing the code.
See More
Hide
See All
Get it
here
Recommend
8
1
--
Pyramid
My Rec
ommendation
for
Pyramid
My Recommendation for
Pyramid
All
5
Pros
3
Cons
1
Specs
Top
Pro
•••
Very flexible
Pyramid can be used for creating small applications quickly and easily, but it also powers up large enterprise-scale applications such as Dropbox.
See More
Top
Con
•••
The great number of options it offers can become intimidating
One of Pyramid's greatest drawbacks is that it requires a lot of set up in the beginning of a project. This can feel overwhelming and can keep people away from using it.
See More
Specs
Written in:
Python
Default ORM:
SqlAlchemy
Default Template Engine:
Jinja2
Top
Pro
•••
Persistence agnostic
Either NoSQL and SQL (including SQLAlchemy plugin).
See More
Top
Pro
•••
Comes with security included
Includes authorization and authentication with multiple backends.
See More
Hide
See All
Get it
here
Recommend
5
1
--
Falcon
My Rec
ommendation
for
Falcon
My Recommendation for
Falcon
All
6
Experiences
1
Pros
3
Cons
1
Specs
Top
Con
•••
Limited in scope
Being designed around building REST APIs and the fact that it's minimalistic with very few dependencies makes Falcon opinionated (you should build a REST API) and limited in scope (you shouldn't be using Falcon to build a news site, blog or ecommerce platform).
See More
Top
Pro
•••
Built to build REST APIs
Falcon is designed entirely around building REST APIs. It achieves this helps a lot with it being lightweight and simple. It also helps developers take some design choices which would otherwise not be possible with a more general-purpose framework,
See More
CourteousTaraxippus's Experience
I have migrated my flask application to Falcon in 3hours. Performance improves a lot.
See More
Specs
Platforms:
Windows, Linux, Mac
Technology:
Javascript
Top
Pro
•••
Lightweight with minimal dependencies
Falcon is a very lightweight framework. This can be noticed simply by looking at the dependency list: other than the python standard library, six and mimeparse are the only dependencies.
See More
Top
Pro
•••
Performance is really awesome
See More
Hide
See All
Get it
here
Recommend
11
3
--
Aiohttp
My Rec
ommendation
for
Aiohttp
My Recommendation for
Aiohttp
All
3
Pros
2
Cons
1
Top
Con
•••
Small community
See More
Top
Pro
•••
The web-server has middlewares and pluggable routing
See More
Top
Pro
•••
Supports client and server side of HTTP protocol
See More
Hide
See All
Get it
here
Recommend
3
1
--
Tornado
My Rec
ommendation
for
Tornado
My Recommendation for
Tornado
All
3
Pros
2
Cons
1
Top
Con
•••
It's usually useful only when building real-time web applications
Because it's basically a framework for building real-time applications it has great support for things like WebScokets and uses non-blocking I/O. But it lacks in features that are used to build general-purpose websites like blogs, e-commerce sites, web portals etc... For example it lacks ORM integration (at least out of the box) and it doesn't have a very powerful template engine.
See More
Top
Pro
•••
Designed for performance
Tornado can scale to several open connections at the same time. This makes it perfect for applications where performance is very important.
See More
Top
Pro
•••
Amazing asynchronous functionalities
See More
Hide
See All
Get it
here
Recommend
6
4
--
web.py
My Rec
ommendation
for
web.py
My Recommendation for
web.py
All
4
Pros
3
Cons
1
Top
Con
•••
Not under active development
See More
Top
Pro
•••
Easy to deploy, low on resources and can handle mid level traffic sites with ease
See More
Top
Pro
•••
Very easy to learn, very pythonic
See More
Top
Pro
•••
Most tasks required by a framework are built-in
Things like database access, templating, forms, validation, REST calls and authentication are all available out of the box.
See More
Hide
See All
Get it
here
Recommend
3
1
--
Klein
My Rec
ommendation
for
Klein
My Recommendation for
Klein
All
2
Pros
1
Cons
1
Top
Con
•••
Lacks database integration
Talking to database is a pretty common thing for a web application to do. Larger frameworks know this, and cover it in some detail by the end of the tutorial. In contrast, the Klein documentation is currently silent on this topic, leaving the issue of how to do database queries in a way that won't block your event-driven code entirely up to you.
See More
Top
Pro
•••
More concurrent requests, more interactivity
The fact that a Klein server is event-driven and non-blocking means that it can start handling a new request while previous requests are still open. This lets you serve more requests from a single process, meaning running multiple servers is now an option to be explored when your site makes it big, rather than a necessity for responsiveness under even modest loads. Multiple requests per process also gives you flexibility to do things that would be impractical in WSGI-based alternatives like Flask or Bottle, such as keeping a connection to the browser open to send it chat messages or game updates in a Server Sent Event stream.
See More
Hide
Get it
here
Recommend
4
Don't see your favorite option? Add it.
Built By the Slant team
Find the best product instantly.
4.7 star rating
Add to Chrome
Add to Edge
Add to Firefox
Add to Opera
Add to Brave
Add to Safari
Try it now - it's free
One sec!
Are you sure that you want to abandon your hard work?
Delete Work
Continue working
{}
undefined
url next
price drop