One of the types of software that’s important for a web developer is the web framework. A framework “is a code library that makes a developer’s life easier when building reliable, scalable, and maintainable web applications” by providing reusable code or extensions for common operations. By saving development time, developers can concentrate on application logic rather than mundane elements.
A web framework offers the developer a choice about how to solve a specific problem. By using a framework, a developer lets the framework control portions of their application. While it’s perfectly possible to code a web application without using a framework, it’s more practical to use one.
We covered the finest Python web frameworks in a previous article. Some of those applications are possibly best described as mega-frameworks. They can make decisions for you that you may not agree with. The alternative to a mega-framework is the microframework.
This article examines the best Python microframeworks. Micro means the framework is small, with little or no tools and libraries. Microframeworks are designed with extensibility in mind. They provide an essential set of features and rely on extensions to do the rest. Microframeworks have the advantage of making no or fewer decisions for you, making it easy to start development.
When it comes to web development, there are a wide range of Python microframeworks to choose from. The choice actually helps you find the right tool for the job. Here’s our pick of the finest open source microframeworks captured in a legendary LinuxLinks-style ratings chart.
Click the links in the table below to learn more about each microframework.
|Best Python Micro Frameworks|
|Flask||Hugely popular microframework based on Werkzeug and Jinja2|
|FastAPI||Web framework for building APIs|
|Starlette||Lightweight ASGI framework/toolkit|
|aiohttp||Asynchronous HTTP client/server for asyncio and Python|
|Sanic||Web server and web framework|
|Falcon||Build cloud APIs, smart proxies, and app backends|
|Quart||Web microframework based on Asyncio|
|Pyramid||Start small, finish big, stay finished framework|
|Bottle||Fast, simple and lightweight WSGI micro web framework|
|Chalice||Python Serverless Microframework for AWS|
|Hug||Make developing Python driven APIs as simple as possible|
|CherryPy||Mature, minimalist, Python object-oriented web framework|
|TurboGears||Hybrid framework acting as a Full Stack framework or Microframework|
|Quixote||Aimed at sites where complex programming is required|
|Klein||Micro-framework for developing production-ready web services with Python|
This article has been revamped in line with our recent announcement.
Background to Python
Python is a general-purpose high-level programming language. Its design philosophy emphasizes programmer productivity and code readability. It has a minimalist core syntax with very few basic commands and simple semantics, but it also has a large and comprehensive standard library, including an Application Programming Interface (API).
It features a fully dynamic type system and automatic memory management, similar to that of Scheme, Ruby, Perl, and Tcl, avoiding many of the complexities and overheads of compiled languages. The language was created by Guido van Rossum in 1991, and continues to grow in popularity, in part because it is easy to learn with a readable syntax. The name Python derives from the sketch comedy group Monty Python, not from the snake.
Python is an increasingly popular programming language. It ranks very highly on sites listing the popularity of programming languages, such as the TIOBE Index, IEEE Spectrum ranking, and the PYPL PopularitY of Programming Language.
The prominence of Python is, in part, due to its flexibility, with the language frequently used by web and desktop developers, system administrators, data scientists, and machine learning engineers. It’s easy to learn and powerful to develop any kind of system with the language. Python’s large user base offers a virtuous circle. There’s more support available from the open source community for budding programmers seeking assistance.
|Read our complete collection of recommended free and open source software. Our curated compilation covers all categories of software.
The software collection forms part of our series of informative articles for Linux enthusiasts. There are hundreds of in-depth reviews, open source alternatives to proprietary software from large corporations like Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.
There are also fun things to try, hardware, free programming books and tutorials, and much more.