1. Web Frameworks for Python

A Web framework is a collection of packages or modules which allow developers to write Web applications (see WebApplications) or services without having to handle such low-level details as protocols, sockets or process/thread management.

The majority of Web frameworks are exclusively server-side technology, although, with the increased prevalence of AJAX, some Web frameworks are beginning to include AJAX code that helps developers with the particularly tricky task of programming (client-side) the user's browser. At the extreme end of the client-side Web Frameworks is technology that can use the web browser as a full-blown application execution environment (a la gmail for example): see Web Browser Programming for details.

As a developer using a framework, you typically write code which conforms to some kind of conventions that lets you "plug in" to the framework, delegating responsibility for the communications, infrastructure and low-level stuff to the framework while concentrating on the logic of the application in your own code. This "plugging in" aspect of Web development is often seen as being in opposition to the classical distinction between programs and libraries, and the notion of a "mainloop" dispatching events to application code is very similar to that found in GUI programming.

Generally, frameworks provide support for a number of activities such as interpreting requests (getting form parameters, handling cookies and sessions), producing responses (presenting data as HTML or in other formats), storing data persistently, and so on. Since a non-trivial Web application will require a number of different kinds of abstractions, often stacked upon each other, those frameworks which attempt to provide a complete solution for applications are often known as full-stack frameworks in that they attempt to supply components for each layer in the stack.

Many frameworks now provide an element of customization in their support for the above activities and abstractions, utilizing components in that they provide abstractions only for certain specific things. As a result, it can be possible for you to build your own full-stack framework almost entirely from existing components.

A web application may use a combination of a base HTTP application server, a storage mechanism such as a database, a template engine, a request dispatcher, an authentication module and an AJAX toolkit. These can be individual components or be provided together in a high-level framework.

These are the most popular high-level frameworks. Many of them include components listed on the WebComponents page.

Name

Latest version

Latest update date

description

Django

5.0.2

2024-02-06

The Web framework for perfectionists (with deadlines). Django makes it easier to build better Web apps more quickly and with less code. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. It lets you build high-performing, elegant Web applications quickly. Django focuses on automating as much as possible and adhering to the DRY (Don't Repeat Yourself) principle. The last release supporting Python 2.7 is 1.11 LTS. See Django

Reflex

0.6.0

2024-09-03

Reflex is the open-source framework empowering Python developers to build web apps faster. Build both your frontend and backend in a single language, Python (pip install reflex), with no JavaScript or web development experience required. Build anything from internal data and AI apps to large public-facing web apps and deploy with a single command (reflex deploy). Reflex provides high-level UI components, easy deployment and AI agents to create, edit, and deploy apps 10x faster than traditional web development while also remaining extensible through custom components that can fully leverage JavaScript's expressivity.

Masonite

4.19.1

2024-02-25

Masonite is the developer focused dev tool with all the features you need for the rapid development you deserve. Masonite is perfect for beginners getting their first web app deployed or advanced developers and businesses that need to reach for the full fleet of features available. Masonite works hard to be fast and easy from install to deployment so developers can go from concept to creation in as quick and efficiently as possible. Use it for your next SaaS! Try it once and you’ll fall in love.

TurboGears

2.4.3

2020-03-01

the rapid Web development webframework you've been looking for. Combines SQLAlchemy (Model) or Ming (MongoDB Model), Kajiki (View), Repoze and ToscaWidgets2. Create a database-driven, ready-to-extend application in minutes. All with designer friendly templates, easy AJAX on the browser side and on the server side, with an incredibly powerful and flexible Object Relational Mapper (ORM), and with code that is as natural as writing a function. After reviewing the Documentation, check out the Tutorials

web2py

2.27.1

2023-11-16

* Python 2.7, Python 3.5+, PyPy * All in one package with no further dependencies. Development, deployment, debugging, testing, database administration and maintenance of applications can be done via the provided web interface, but not required. * web2py has no configuration files, requires no installation, can be run off a USB drive. * web2py uses Python for the Model, View and the Controller * Built-in ticketing system to manage errors * Internationalization engine and pluralization, caching system * Flexible authentication system (LDAP, MySQL, janrain etc) * NIX(Linux, BSD), Windows, Mac OSX, tested on EC2, Webfaction * works with MySQL, PostgreSQL, SQLite , Firebird, Oracle, MSSQL and the Google App Engine via an ORM abstraction layer. * Includes libraries to handle HTML/XML, RSS, ATOM, CSV, RTF, JSON, AJAX, XMLRPC, WIKI markup. * Production ready, capable of upload/download of very large files * Emphasis on backward compatibility.

See below for some other arguably less popular full-stack frameworks!

1.2. Other Full-Stack Frameworks

These frameworks also provide most, if not all of the technology stack. However, they are regarded as not being as popular as the frameworks listed above.

Name

Latest version

Latest update date

description

CubicWeb

4.6.3

2024-02-23

a semantic web application framework featuring a query language, a selection+view mechanism, multiple databases, security, workflows, reusable components, etc.

Dash

2.15.0

2024-01-31

Dash is the most downloaded, trusted framework for building ML & data science web apps.

Django-hotsauce

1.4

2021-11-02

Scalable and heterogeneous web toolkit sitting on top of Django and others. Django-hotsauce is a pragmatic fork of Django 1.x API to develop scalable and extensible WSGI applications in Python 3.

Grok

5.0

2024-01-29

built on the existing Zope 3 libraries, but aims to provide an easier learning curve and a more agile development experience. It does this by placing an emphasis on convention over configuration and DRY (Don't Repeat Yourself).

Jam.py

5.5.4

2024-06-21

Jam.py primary goal is to allow development of database-driven business web applications easily and quickly, based on DRY (another "Don't Repeat Yourself") principle, with emphasis on CRUD. Jam.py has no configuration files, requires no installation other than pip or unzip, can be run as a portable App.

Pylons

1.0.3

2018-01-12

a lightweight Web framework emphasizing flexibility and rapid development. It combines the very best ideas from the worlds of Ruby, Python and Perl, providing a structured but extremely flexible Python Web framework. It was also one of the first projects to leverage the emerging WSGI standard, which allows extensive re-use and flexibility but only if you need it. Out of the box, Pylons aims to make Web development fast, flexible and easy. Pylons is built on top of Paste (see below). NOTE: Pylons the web framework is in maintenance-only status after merging with Pyramid to form the Pylons Project to develop web technologies using Python.

Reahl

7.0.3

2024-03-07

With Reahl, programming is done purely in Python, using concepts familiar from GUI programming - like reusable Widgets and Events.

Simian

3.0.1

2024-06-11

Simian is a full-stack development framework combined with a deployment portal. Simian Gui offers oo frontend definition in pure Python, eliminating the need for JS, CSS, or HTML. With Simian Builder, design of your frontend using a drag-and-drop graphical editor, is even simpler. Perfect for domain experts, Simian empowers you to create full web apps seamlessly. Simian Gui and Simian Builder are built on top of Form.io. When data lineage and reproducability of computational jobs are important, Simian Wrapper is instrumental. Regarding deployment, Simian Portal serves as the central hub for managing and deploying your Simian Web Apps to end-users, offering authentication and authorization functionalities. Additionally, Simian supports web apps implemented in Julia and MATLAB, alongside Python.

Websauna

1.0a13

2019-06-26

A full stack Python framework for building consumer and business web applications. Websauna builds upon Pyramid, SQLAlchemy, and other mature open source components. Jupyter Notebook is directly integrated to Websauna. Analyzing website data and building interactive visualizations is within a reach of one click. Websauna needs Python 3.5.2 or newer.

wheezy.web

3.2.0

2023-07-28

A lightweight, high performance, high concurrency WSGI web framework with the key features to build modern, efficient web. Requires Python 2.4-2.7 or 3.2+. MVC architectural pattern (push-based). Includes routing, model update/validation, authentication/authorization, content caching with dependency, xsrf/resubmission protection, AJAX+JSON, i18n (gettext), middlewares, and more. Template engine agnostic (integration with: jinja2, mako, tenjin and wheezy template) plus html widgets.

Zope

5.9

2023-11-24

Being the grandaddy of Python web frameworks, Zope has grown into a family of frameworks over the years. Zope 1 was released in 1999. Zope 2 is both a web framework and a general purpose application server, today it is primarily used by ContentManagementSystems. Zope 3 is both a standalone framework and a collection of related libraries, which are also included with newer releases of Zope 2. All of the Zope frameworks include the ZODB, an object database for Python.

Zope3

4.1.2

2019-09-19

These projects provide the base "application server", either running as its own independent process, upon Apache or in other environments. On many of these you can then introduce your own choice of templating engines and other components to run on top, although some may provide technologies for parts of the technology stack.

Name

365 Day Ranking

Latest Release

Description

aiohttp
(pypi: aiohttp)

51

3.9.3 (2024-01-29)

Async http client/server framework

Bottle
(pypi: bottle)

1150

0.12.25 (2023-03-04)

a fast and simple micro-framework for small web-applications. It offers request dispatching (Routes) with url parameter support, Templates, key/value Databases, a build-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines. All in a single file and with no dependencies other than the Python Standard Library.

CherryPy
(pypi: CherryPy)

1810

18.9.0 (2023-12-13)

a pythonic, object-oriented HTTP framework. CherryPy powered web applications are in fact stand-alone Python applications embedding their own multi-threaded web server. TurboGears, web2py (see above) also use CherryPy.

Falcon
(pypi: falcon)

1537

3.1.3 (2023-12-05)

- lightweight, API-oriented framework designed to be fast. Falcon powers the popular Hug web framework. Supports Python 2.7 and 3.

FastAPI
(pypi: fastapi)

189

0.110.0 (2024-02-25)

a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.

Flask
(pypi: Flask)

57

3.0.2 (2024-02-03)

“a microframework for Python based on Werkzeug, Jinja 2 and good intentions.” Includes a built-in development server, unit tesing support, and is fully Unicode-enabled with RESTful request dispatching and WSGI compliance.

Hug
(pypi: hug)

7739

2.6.1 (2020-02-06)

Embrace the APIs of the future. Hug aims to make developing APIs as simple as possible, but no simpler. It's one of the first fully future looking frameworks: only supporting Python3+.

Pyramid
(pypi: pyramid)

2700

2.0.2 (2023-08-25)

a small, fast, down-to-earth, open source Python web development framework. It makes real-world web application development and deployment more fun, more predictable, and more productive. Pyramid is a Pylons Project, and is the successor to the Pylons web framework.

Quart
(pypi: Quart)

2728

0.19.4 (2023-11-19)

a Python web microframework based on Asyncio. It is intended to provide the easiest way to use the asyncio functionality in a web context, especially with existing Flask apps. This is possible as Quart has the same API as Flask.

1.4. Other Non Full-Stack Frameworks

1.5. Discontinued/Inactive Frameworks

The following frameworks are either discontinued, in that their developers may have stated that they no longer maintain the code, or appear to be inactively developed or maintained, in that the Web site for the project has remained unchanged for an extended period of time.

1.6. Books and Articles

1.7. Content Management Systems

Content management systems (CMS) often allow you to build applications like functionality upon them and typically provide many of the facilities seen in full-stack frameworks. See ContentManagementSystems for more details.

1.8. Web Components

Some frameworks promote interoperable components for things like templating/output and authentication/authorization, and so you might see users of different frameworks actually using the same component or library. See WebComponents for details of such components.

1.9. Web Client Frameworks

In contrast to server-oriented frameworks which may offer AJAX (asynchronous JavaScript and XML) support by serving pre-packaged (inflexible and highly specific but otherwise very useful) JavaScript components, and offering server-side support for requests made by such JavaScript components, Web client frameworks take more direct advantage of the dynamic capabilities of browser engines. Ways in which the full potential of browser engines can be realized are, for example, by compiling Python code into JavaScript or by embedding a Python interpreter into the Web browser itself. In some cases, Web browser engines can be run within separate customized applications rather than in a "web browser" per se. See Web Browser Programming for details.

1.10. See Also

More information on python web frameworks can be found here:

Other related wiki pages:

1.11. Editorial Note

The above lists should be arranged in ascending alphabetical order - please respect this when adding new solutions. When specifying release dates please use the format YYYY-MM-DD.

Some special notes to contributors to this page who like to assume an advocacy position when "reorganizing" the content:

And some basic editing advice: use the preview button when making edits, rather than leaving tens of micro-changes in the history.


CategoryPythonWebsite

WebFrameworks (last edited 2024-09-04 01:20:47 by TomGots)

Unable to edit the page? See the FrontPage for instructions.