Trace: » python10.html

[hemmerling] Python 10/10 - Web Application Frameworks

How to design and create Web Applications with Web Frameworks & other Frameworks

Comparison of Python Frameworks suitable for Web Services

Framework Webserver User Interface Object Relationa Model ( ORM ) Database Shipped with REST API functions Comment
Django Yes Yes Yes Yes Yes, using “Django REST framework”
Flask Yes No No No Yes
Bottle Yes No No No Yes
SQL Alchemy No No Yes Yes No Suitable for Web services, though no Web framework

Implementation Suggestions

  • Experts suggested not to consider a self-implementation of a REST API, please use frameworks with REST support, or REST addons for frameworks :-).
  • Experts considered:
    • Flask and Bottle to be good to build a Web API ( with some business logic written in Python ), but no data storage is needed.
    • Django to be good:
      • for database-driven applications, where just a limited number of pages is provided by the application. No “new” pages are generated, but the data of existing pages is frequently updated.
      • to do data collecting of instrumentation data of Internet-of-Thing devices, both with API ( with some business logic written in Python, making use of the data collected in the database ) and user interface. However, if the major data analysis application on the server / in the cloud is written in Java ( e.g. Opensource business intelligence software ), it should be considered to write the whole web application in Java ( e.g. with Tomcat Server ).
      • Front-end for database, e.g. IOT database, Industry 4.0 database.
        • But it mustn´t be the right choice to receive the IOT data from the IOT devices. The requirements for such a webservice depend on
          • How many sources send data ( push ) or must be polled ?
          • Are just small data packages sent, or big data ( BLOBs, e.g. photos ) ?
          • Does the data transfer happen in “normal” speed, or does it take a minute or longer to receive even a small data package with a “minimum” transfer speed ?!

Implementation Example

  • Speech “Building data products with Flask and AngularJS” by Andy Goldschmidt on the Python Unconference Hamburg in Hamburg, 2015-09-05.
        • “Demo webapp that parses a CSV in the frontend and applies a ML algorithm on the parsed data in the backend”.
        • An AngularJS frontend in the browser → RESTful JSON API → Flask Web Application → Pandas Scikit.
        • In this special case, image processing is done in the browser, not by an OpenCV application on the server!
        • 2 Functions:
          1. Upload CVS file to classify your data.
          2. Upload images, get back numeric values.

Web Servers & Web Frameworks


  • AccessGrid - Free “grid” webserver system, based on Python. “An ensemble of resources including multimedia large-format displays, presentation and interactive environments, and interfaces to Grid middleware and to visualization environments”.

ACME Systems


  • "Authomatic", GitHub "peterhudec/authomatic" - “A framework agnostic library, for Python web applications, with a minimalistic but powerful interface which simplifies authentication of users, by third party providers like Facebook or Twitter, through standards like OAuth and OpenID”.


  • Bokeh, GitHub "bokeh" - ”“Bokeh is a Python interactive visualization library that targets modern web browsers for presentation”, “Interactive Web Plotting for Python”.

Bottle: Python Web Framework

CherryPy - A Minimalist Python Web Framework


The Framework

Extensions and Code Snippets

Django Applications which provide functional Extensions for own Django Applications
Code Snippets
  • Djangosnippets - “A site for users of the Django web framework to come together and share useful 'snippets' of reusable code”.
Package Resources
  • Django Packages - “A directory of reusable apps, sites, tools, and more for your Django projects”.

Application Design with Django

Object Relational Model ( ORM )
Djanbo versus MVC
  • Django Model = MVC Model.
  • Django View = MVC Controller.
  • Django Template = MVC View.

How To Start with Django Development

How to proceed
  1. “django-admin startproject your_projectname”.
  2. “ syncdb”.
  3. “ pystartup your_application”.
  4. In ”your_projectname/”, disable “Debug = True” and “Template_Debug=True” for production use.
  5. Now there is the Django application available at http://localhost:8000/, and an admin interface at http://localhost:8000/admin.
  6. “ admin_generator your_application”.
How to setup the HTML5 Stuff for use with Django Applications



  • Experts told me, that “Django 2.0” was a major step, from “Django 1.11” and that you need different training material ( literature, online tutorials ).
  • Experts suggested to use “Django LTS” versions for stable development, and to use a book fitting with this version. In 2018-04, the current “Django LTS” version is “Django 1.11 LTS” :-)
  • Experts told me: “Django” has 1000s of unactivated features. So almost everyting is already “there”, so that you can use with without much own effort.
  • “Py.test” ( See: Unit Test / Module Test ) is the defined as standard test framework with Django :-), there are many test application examples provided.
  • “Django Runserver”, the webserver provided with “Django”, as most basic webservers provided by software frameworks, is not intended for production use. So you need a professional webserver ( See Content Management Systems ( CMS ) ), where you can deploy your Django web application.
  • Structure of a website built with Django:
    • A Django project provides a website. It is the collection of several Django apps.
    • A Django app provides a single page ( CMS, newfeed, formular, weather report,..). The Django web application may provide an unlimited copy if the pages. But though the contents of the page is dynamic by the Python code which may include dynamic data by request, each page has a fixed task - fixed by the code at implementation time.
    • A CMS system on the top of Django may provide a useful interface for applications, where new pages with new contents are generated frequently.
  • Classy Class-Based Views - “Detailed descriptions, with full methods and attributes, for each of Django's class-based generic views”.
  • Blog Reinout van Rees’ weblog- “I work a lot with Python (programming language) and Django (website framework)”.



  • Gunicorn - “Python WSGI HTTP Server for UNIX. It's a pre-fork worker model ported from Ruby's Unicorn project. The Gunicorn server is broadly compatible with various web frameworks, simply implemented, light on server resources, and fairly speedy”.

iix - a simple python webserver


Pylons Project

Python Paste

TurboGears Web Framework


Mamba / BlackMamba

  • BlackMamba ( Mamba ) - “Small and high level asynchronous web applications framework and WSGI web server”, “Mamba is built on top of Twisted Web and uses Twisted as WSGI web server as well”.


  • webpy - “A web framework for Python that is as simple as it is powerful”.




Major Web CMS and other Applications based on Django & Python 3.x

Django CMS


  • Django-Neon - “The CMS-Application for Django-Projects”.



Wagtail CMS

    • “A Django content management system focused on flexibility and user experience”. Based on Python3.
    • It is a framework to build a CMS, not a ready-to-use CMS.

Some other Web CMS and other Applications based on Django & Python 3.x

Django page CMS

Some other Web CMS and other Applications based on Django & Python 2.x

Django Fiber



  • GitHub "Opps" - “A Django-based CMS for the magazines, newspappers websites and portals with high-traffic”.

Transifex - Web-based Translation Platform based on Django

The commercial Service
  • The current commercial online service Transifex.
The OpenSource Tool


ZOPE & Web CMS based on ZOPE



The Tool
  • The OpenSource web application server Zope.ORG - “An open source web application server primarily written in the Python programming language. It features a transactional object database which can store not only content and custom data, but also dynamic HTML templates, scripts, a search engine, and relational database (RDBMS) connections and code”.


Business Applications ( Webshop, ERP,..)

Commercial Application Servers

ESB, SOA, REST, APIs and Cloud Integrations

  • The OpenSource Python application ZATO - “Open Source ESB, SOA, REST, APIs and Cloud Integrations in Python”.


Python Web Frameworks, which might be used to build RPC Services

Python Web Frameworks, which might be used to build REST Services

Commercial Online Services for Python Web Applications

    • “Python Profiling Tool”.
    • “Actionable insights to monitor & improve the performance of your Python applications”,
    • Support of web application frameworks: django, Pylons, Bottle, CherryPy, Web2Py, Flask.

Appropriate OpenDirectory Directory Pages

en/python10.html.txt · Last modified: 2023/11/24 16:03 (external edit) · []
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki