Chapter 1. Python Web Framework Landscape
There are many options for building web applications with Python. Python’s powerful yet flexible nature makes it perfect for this task. It’s a good idea to know what’s available before going in that direction, though. Perhaps one of the many existing options will suit your needs and save you a ton of work.
To make it easier to know at a glance what frameworks are out there, the following list shows 30 web frameworks that are active and have more than 1,000 monthly downloads at the time of this writing. For each framework, the list presents the following information:
- Slogan
- This is a short phrase that comes from the framework’s site or documentation and attempts to convey the spirit of the framework according to its creators.
- Description
- In a nutshell, what this framework is and why you should use it.
- Author
- Main author, according to Python Package Index.
- Website
- Official website of the framework, or code repository if no site is available.
- Relative popularity
- A very crude attempt at gauging a project’s popularity, by normalizing the number of monthly downloads and generating a score. Its purpose is only to give the reader a general idea about how one framework compares to another in terms of number of users. For example, Django, which is the Python framework with the largest number of downloads, has 10 stars. At the other end of the spectrum, BlueBream, which is barely above 1,000 downloads, has one star. This popularity scale should not be taken too seriously.
- Python versions
- Shows the versions of Python that the framework runs on.
- License
- Shows the license under which the framework is distributed.
- Documentation
- This is a key part of any framework, because the more you know about how to use it, the quicker you can get started and take advantage of its features. Some people learn by example, so having tutorials and sample code can be very helpful too, both for beginners and more advanced users. For each framework, documentation is graded using a very simple scale: poor, adequate, extensive, or comprehensive. Again, this is very subjective and only meant as a simple guide to know what to expect.
- Features
- A short list of what the framework’s authors consider its best features.
- Other resources
- This refers to resources other than web pages to get help and information for a framework, like mailing lists and IRC channels.
- Persistence
- Many web applications require a storage layer of some sort, usually a database. Because of this, most web frameworks are designed to use one or more specific data persistence options.
- Templating
- This is another very common feature of web frameworks. The HTML markup for an application page is usually written in a templating language.
Web Framework List
Appier
Joyful Python Web App development.
Appier is an object-oriented Python web framework built for super-fast app development. It’s as lightweight as possible, but not too lightweight. It gives you the power of bigger frameworks, without the complexity.
Author
Hive Solutions Lda.
Website
Relative popularity
*****
Python versions
2.6 to 3.5
License
Apache
Documentation
Adequate
Other resources
None
Persistence
MongoDB
Templating
Jinja2
Features
- REST dispatching
- JSON response encoding
- Admin interface
- i18n
Aspen
A Python web framework that makes the most of the filesystem. Simplates are the main attraction.
Aspen maps your URLs directly to the filesystem. It’s way simpler than regular expression routing or object traversal.
Author
Gratipay, LLC
Website
Relative popularity
******
Python versions
2.6, 2.7
License
MIT
Documentation
Adequate
Other resources
IRC
Persistence
Any
Templating
Python, Jinja2, Pystache
Features
- Simplates: code and template in same file, with structure
- JSON helpers
- Filesystem-based URL mapping
BlueBream
The Zope Web Framework.
BlueBream is an open source web application server, framework, and library created by the Zope community and formerly known as Zope 3. It is best suited for medium to large projects split into many interchangeable and reusable components.
Author
Zope Foundation and Contributors
Website
Relative popularity
*
Python versions
2.6, 2.7
License
ZPL
Documentation
Extensive
Other resources
Mailing list
Persistence
ZODB
Templating
ZPT
Features
- Built on top of Zope 3
- Full stack, but with distributed architecture
- Mature, well-tested components
- Object database
Bobo
Web application framework for the impatient.
Bobo is a lightweight framework for creating WSGI web applications. Its goal is to be easy to use and remember.
Author
Jim Fulton
Website
Relative popularity
*
Python versions
2.6 to 3.5
License
ZPL
Documentation
Extensive
Other resources
Mailing list
Persistence
Any
Templating
Any
Features
- Subroutes for multiple-step URL matching
- JSON request bodies
- Automatic response generation, based on return value
Bottle
Fast and simple WSGI framework for small web applications.
Bottle is a fast, simple, and lightweight WSGI micro web framework for Python. It is distributed as a single-file module and has no dependencies other than the Python Standard Library.
Author
Marcel Hellkamp
Website
Relative popularity
******
Python versions
2.6 to 3.5
License
MIT
Documentation
Extensive
Other resources
Mailing list, IRC, Twitter
Persistence
Any
Templating
Simple templates, Jinja2, Mako, Cheetah
Features
- HTTP utilities
- Single file distribution
CherryPy
A Minimalist Python Web Framework.
CherryPy allows developers to build web applications in much the same way they would build any other object-oriented Python program.
Author
CherryPy Team
Website
Relative popularity
******
Python versions
2.6 to 3.5
License
BSD
Documentation
Comprehensive
Other resources
Mailing list, IRC
Persistence
Any
Templating
Any
Features
- Authorization, sessions, static content, and more
- Configuration system
- Plugin system
- Profiling and coverage support
Clastic
A functional Python web framework that streamlines explicit development practices while eliminating global state.
Clastic was created to fill the need for a minimalist web framework that does exactly what you tell it to, while eliminating common pitfalls and delays in error discovery.
Author
Mahmoud Hashemi
Relative popularity
*
Python versions
2.6, 2.7
License
BSD
Documentation
Basic
Other resources
None
Persistence
Any
Templating
Any
Features
- No global state
- Proactive URL route checking
- Improved middleware paradigm
Cyclone
Facebook’s Tornado on top of Twisted.
Cyclone is a web server framework for Python that implements the Tornado API as a Twisted protocol.
Author
Alexandre Fiori
Website
Relative popularity
***
Python versions
2.6, 2.7
License
Apache
Documentation
Adequate
Other resources
None
Persistence
Twisted adbapi, redis, sqlite, mongodb
Templating
Cyclone templates
Features
- Asyncio stack
- Command-line integration
Django
The web framework for perfectionists with deadlines.
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
Author
Django Software Foundation
Website
Relative popularity
**********
Python versions
2.6 to 3.5
License
BSD
Documentation
Comprehensive
Other resources
Mailing lists, IRC
Persistence
Django ORM
Templating
Django templates, Jinja2
Features
- Fully loaded: authentication, site maps, feeds, etc.
- Superbly documented
- Extensible admin interface
- Security-minded
Falcon
An unladen web framework for building APIs and app backends.
Falcon is a minimalist, high-performance web framework for building RESTful services and app backends with Python.
Author
Kurt Griffiths
Website
Relative popularity
****
Python versions
2.6 to 3.5
License
Apache
Documentation
Extensive
Other resources
Mailing list, IRC
Persistence
Any
Templating
Any
Features
- Web service oriented
- Focused on performance
Fantastico
Pluggable, developer-friendly content publishing framework for Python 3 developers.
Python 3 MVC web framework with built-in capabilities for developing web services and modular web applications.
Author
Radu Viorel Cosnita
Relative popularity
*
Python versions
3.3, 3.4, 3.5
License
MIT
Documentation
Adequate
Other resources
None
Persistence
Fantastico ORM
Templating
Any
Features
- Extensible routing engine
- ORM
- Dynamic content generation
Flask
Web development one drop at a time.
A micro framework based on Werkzeug, Jinja2, and good intentions.
Author
Armin Ronacher
Website
Relative popularity
*********
Python versions
2.6, 2.7, 3.3, 3.4, 3.5
License
BSD
Documentation
Comprehensive
Other resources
Mailing list, IRC
Persistence
Any
Templating
Jinja2
Features
- Built-in debugger
- RESTful request dispatching
- Allows modular applications with plugins
- Extensible
Giotto
Web development simplified. An MVC framework supporting Python 3.
Giotto is a Python web framework. It encourages a functional style where model, view, and controller code is strongly decoupled.
Author
Chris Priest
Website
Relative popularity
**
Python versions
2.7, 3.3, 3.4, 3.5
License
Own
Documentation
Adequate
Other resources
Google group
Persistence
SQLAlchemy
Templating
Jinja2
Features
- Generic views and models
- Functional CRUD patterns
- Automatic RESTful interface
- Automatic URL routing
Grok
A smashing web framework.
Grok uses the Zope Component Architecture and builds on Zope concepts like content objects (models), views, and adapters. Its simplicity lies in using convention over configuration and sensible defaults when wiring components together.
Author
Grok Team
Website
Relative popularity
***
Python versions
2.6, 2.7
License
ZPL
Documentation
Extensive
Other resources
Mailing list
Persistence
ZODB
Templating
Zope page templates
Features
- Convention over configuration
- Takes advantage of full Zope toolkit
- Object-oriented database
kiss.py
MVC web framework in Python with Gevent, Jinja2, and Werkzeug.
Author
Stanislav Feldman
Relative popularity
*
Python versions
2.6, 2.7
License
Own
Documentation
Poor
Other resources
None
Persistence
Pewee
Templating
Jinja2
Features
- Integration with Gevent
- REST controllers
- Minified templates
Klein
Werkzeug + twisted.web.
Klein is a micro framework for developing production-ready web services with Python. It’s built on widely used and well-tested components like Werkzeug and Twisted.
Author
Amber Brown
Website
Relative popularity
*****
Python versions
2.6 to 3.5
License
MIT
Documentation
Adequate
Other resources
IRC
Persistence
Any
Templating
Twisted templates
Features
- Focus on web services
- Integrates Twisted concepts like deferreds
Morepath
A micro web framework with superpowers.
Morepath is a Python WSGI micro framework. It uses routing, but the routing is to models. Morepath is model-driven and flexible, which makes it expressive.
Author
Martijn Faassen
Website
Relative popularity
**
Python versions
2.6 to 3.5
License
BSD
Documentation
Extensive
Other resources
Mailing list, IRC
Persistence
Any
Templating
Any
Features
- Automatic hyperkinks that don’t break
- Generic UIs
- Simple, flexible permissions
- Easy to extend and override
Muffin
Web framework based on Asyncio stack.
Muffin is a fast, simple, and asyncronous web framework for Python 3.
Author
Kirill Klenov
Website
Relative popularity
*****
Python versions
2.6 to 3.5
License
MIT
Documentation
Poor
Other resources
None
Persistence
Any
Templating
Any
Features
- Asyncio stack
- Command-line integration
Pylons
A framework to make writing web applications in Python easy.
Pylons 1.0 is a lightweight web framework emphasizing flexibility and rapid development.
Author
Ben Bangert, Philip Jenvey, James Gardner
Relative popularity
****
Python versions
2.6, 2.7
License
BSD
Documentation
Extensive
Other resources
Mailing lists, IRC
Persistence
SQLAlchemy
Templating
Mako, Genshi, Jinja2
Features
- Uses existing and well-tested Python packages
- Extensible application design
- Minimalist, component-based philosophy
Pyramid
The start small, finish big, stay finished framework.
Pyramid is a general, open source, Python web application development framework. Its primary goal is to make it easier for a Python developer to create web applications.
Author
Chris McDonough, Agendaless Consulting
Website
Relative popularity
******
Python versions
2.6 to 3.5
License
BSD derived
Documentation
Comprehensive
Other resources
Mailing lists, IRC
Persistence
Any
Templating
Any
Features
- Powerful configuration system
- Overridable asset specifications
- Extensible templating
- Flexible view and rendering systems
Tornado
A Python web framework and asynchronous networking library, originally developed at FriendFeed.
A simple web framework with asynchronous features that allow it to scale to large numbers of open connections, making it ideal for long polling.
Author
Website
Relative popularity
*********
Python versions
2.6 to 3.5
License
Apache
Documentation
Adequate
Other resources
Mailing list, wiki
Persistence
Any
Templating
Tornado templates
Features
- Ideal for long-polling and websockets
- Can scale to tens of thousands of open connections
TurboGears
The web framework that scales with you.
TurboGears is a Python web framework based on the ObjectDispatch paradigm. It is meant to make it possible to write both small and concise applications in Minimal mode or complex applications in Full Stack mode.
Author
TurboGears Release Team
Website
Relative popularity
***
Python versions
2.6, 2.7
License
MIT
Documentation
Extensive
Other resources
Mailing list, IRC, Google+
Persistence
SQLAlchemy
Templating
Genshi
Features
- From micro framework to full-stack applications
- Pluggable applications
- Widget system
- Horizontal data partitioning
Twisted
Building the engine of your Internet.
An extensible framework for Python programming, with special focus on event-based network programming and multiprotocol integration. Twisted includes twisted.web, a web application server based on the concept of resources.
Author
Glyph Lefkowitz
Website
Relative popularity
*******
Python versions
2.6 to 3.5
License
MIT
Documentation
Adequate
Other resources
Mailing list, IRC
Persistence
Any
Templating
twisted.web.template
Features
- Takes advantage of Twisted networking power
- Allows “spreadable” web servers (multiple servers answer requests on same port)
- Can use any WSGI application as a resource
Uliweb
Unlimited Python web framework.
Uliweb is a full-stacked Python-based web framework. It has three main design goals: reusability, configurability, and replaceability. Its functionality revolves around these goals.
Author
Limodou
Relative popularity
*
Python versions
2.6, 2.7
License
BSD
Documentation
Adequate
Other resources
Mailing list
Persistence
Uliorm
Templating
Uliweb
Features
- Based on SQLAlchemy and Werkzeug
- Extensible
- Command-line tools
Watson
It’s elementary, my dear Watson.
A framework designed to get out of your way and let you code your application rather than spend time wrangling with the framework. It follows the “convention over configuration” ideal.
Author
Simon Coulton
Relative popularity
*
Python versions
3.3, 3.4, 3.5
License
Own
Documentation
Adequate
Other resources
Mailing list
Persistence
Any
Templating
Jinja2
Features
- Event-based
- Dependency injection
- Form library
web.py
Think about the ideal way to write a web app. Write the code to make it happen.
web.py is a web framework for Python that is as simple as it is powerful.
Author
Anand Chitipothu
Website
Relative popularity
*****
Python versions
2.6, 2.7
License
Public Domain
Documentation
Adequate
Other resources
Mailing list
Persistence
web.database
Templating
Templetor
Features
- Simple to use
- Own database and template libraries
- Form library
web2py
Everything in one package with no dependencies.
Free open source full-stack framework for rapid development of fast, scalable, secure, and portable database-driven web-based applications.
Author
Massimo Di Pierro
Website
Relative popularity
*
Python versions
2.6, 2.7
License
LGPL 3
Documentation
Extensive
Other resources
Mailing list
Persistence
DAL
Templating
web2py
Features
- Requires no installation and no configuration
- Web-based IDE
- Everything included; no dependencies
- Always backward-compatible
webapp2
Taking Google App Engine’s webapp to the next level!
webapp2 is a lightweight Python web framework compatible with Google App Engine’s webapp.
Author
Rodrigo Moraes
Relative popularity
****
Python versions
2.6, 2.7
License
Apache
Documentation
Extensive
Other resources
Mailing list
Persistence
Google datastore
Templating
Jinja2, Mako
Features
- Compatible with webapp
- Better URI routing and exception handling
- Extras package with optional utilities
WebPages
A Python web framework.
This project was designed for web developers who want to do more in less time. To create a new project with Hello World and a database connection, you only need a few minutes.
Author
Anton Danilchenko
Relative popularity
*
Python versions
3.3, 3.4, 3.5
License
MIT
Documentation
Poor
Other resources
Persistence
WebPages ORM
Templating
WebPages templates
Features
- Convention over configuration
- Settings per component
- User authentication out of the box
- ORM with simplified syntax
wheezy.web
Python’s fastest web framework.
A lightweight, high-performance, high-concurrency WSGI web framework with the key features to build modern, efficient web applications.
Author
Andriy Kornatskyy
Website
Relative popularity
***
Python versions
2.6 to 3.5
License
MIT
Documentation
Adequate
Other resources
None
Persistence
Any
Templating
Jinja2, Mako, Tenjin, Wheezy
Features
- High performance
- Authentication/authorization
- Model update/validation
Get Python Web Frameworks now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.