Differences between revisions 1 and 260 (spanning 259 versions)
Revision 1 as of 2002-07-12 22:29:49
Size: 1284
Editor: anonymous
Comment: missing edit-log entry for this revision
Revision 260 as of 2006-04-12 06:04:57
Size: 13762
Editor: static-151-201-138-242
Comment: tootin' me horn :^)
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
This topic guide is a word by word copy of Paul Boddie's
[http://www.boddie.org.uk/python/web_frameworks.html Python Web Frameworks Overview]. Putting it into Wiki format hopefully allows more people to contribute.

The main purpose of this topic guide is to help in choosing a framework for web programming without having to learn each of them. In addition, information about different PresentationTechnologies is also provided, where appropriate, since this can be a major deciding factor in choosing a framework.

Although comments and clarifications by the framework authors are very much appreciated, adding a standard signature like InTheirOwnWords would help to bring words like 'easy' and 'intuitive' into context.

The rather strict format of the main entries should not been seen as a limit. Feel free to add new pages containing examples, direct comparisons etc.

Known frameworks:
    * ["Zope"]
    * WebWare
    * SkunkWeb
    * TwistedMatrix
    * ["Quixote"]
    * ["Albatross"]
    * JonsPythonModules
#pragma section-numbers off

= Web Programming in Python =

This topic guide links to the frameworks and templating systems available for Web programming in Python. When deciding to develop Web applications or services, you would usually choose a solution from the list below and then possibly hook it up with a templating system and other components such as database access toolkits, if the solution doesn't provide them - some such as Zope provide virtually everything you can think of!

== Python-based Solutions ==

The listing is '''up-to-date as of 2005-09-24'''

=== Standardisation and Standardisation Proposals ===

    * ["WebStack"]
    * [http://www.python.org/peps/pep-0333.html PEP 333: Web Server Gateway Interface] - see also ["WSGIImplementations"]
    * [http://furius.ca/indra/ Indra]
    * [http://www.zetadev.com/software/httpy/ httpy -- a sane and robust Python HTTP server and library]

=== Web Servers ===

    * TwistedMatrix includes a very scalable web server written in Python.
    * [http://www.amk.ca/python/code/medusa.html Medusa, a simple framework for standalone server applications]
    * [http://www.zetadev.com/software/httpy/ httpy -- a sane and robust Python HTTP server and library]

=== Application Framework Collections ===
Collection of other projects that have been glued together to provided a feature rich library, without reinventing the wheel.

 * [http://pylonshq.com/ Pylons] (0.8 Released 02/17/06)modern full-stack Python web development framework combining the very best from the worlds of Ruby, Python and Perl
 * [http://www.turbogears.org/ TurboGears] (0.8.9 Released 01/10/06)TurboGears is the rapid web development megaframework you've been looking for

=== Application Frameworks ===
 * ["Albatross"] (1.33 Released 12/16/05)Albatross is a small and flexible Python toolkit for developing highly stateful web applications.
 * ["Aquarium"] (2.2.1 Released 04/21/05)offers convenient libraries, tight integration with Cheetah, adaptors for various Web environments
 * CherryPy (2.2.0 Released 01/27/06)CherryPy is a pythonic, object-oriented web development framework
 * ["Cymbeline"] (1.3.1 Released 12/09/05)application server framework, including functionality such as DB and arbitrary object pooling, web servers, persistant object repository, and a text console
 * [http://divmod.org/trac/wiki/DivmodNevow Divmod Nevow] (0.7.0 Released 12/02/05) A comprehensive library including a resource model encouraging the separation of application and presentation logic, a markup system with support for designer-friendly XHTML templates and pure-Python templates, and a robust AJAX-like API ([http://divmod.org/trac/wiki/DivmodNevow/Athena Divmod Athena]) which supports the creation of highly dynamic web pages in a structured manner.
 * ["Django"] (.91 Released 01/11/06)Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design
 * ["JOTWeb2"] (1.10 Released 12/30/05)developing dynamic web applications using HTML and TAL/TALES/METAL for templating
        * ["JonsPythonModules"] (1.06 Released 04/11/04) is a set of simple yet powerful multi-threaded object-oriented CGI/FastCGI/mod_python/html-templating modules for Python
 * ["Karrigell"] (2.2.3 Released 03/26/06) designed to be really simple to use : integrated web server and data base
 * [http://www.myghty.org/ Myghty ] (1.0 Released 01/27/06)Web application framework originally ported from HTML::Mason
 * [http://pythonpaste.org/ Python Paste ] (0.4.1 Released 02/18/06)brings consistency to Python web development and web application installation, providing tools for both developers and system administrators
 * [http://nick.borko.org/pse/index.html Python Servlet Engine] (3.0.4 Released 02/17/06)PSE parses your templates into byte compiled "servlets" to produce web pages that run fast
 * PythonWeb (0.6 Released 08/07/05)provide modules for all the common needs of web developers where components can be used together or independently
 * [http://www.mems-exchange.org/software/quixote/ Quixote] (2.4 Released 12/13/05)to develop dynamic web sites while using as much of their existing Python knowledge as possible
 * [http://snakelets.sourceforge.net/ Snakelets] (1.43 Released 12/03/05)simple-to-use Python web application server
 * [http://webpy.org/ web.py] (.137 Released 03/27/06)Think about the ideal way to write a web app. Write the code to make it happen
 * [http://www.webwareforpython.org/ Webware] (.9 Released 11/13/05)is a suite of Python packages and tools for developing object-oriented, web-based applications
 * [http://www.zope.org/ Zope] (2.9 Released 01/07/06)server for building content management systems, intranets, portals, and custom applications

=== Server-embedded Python ===

    * ModPython for Apache
    * ["PyWX"] for AOLServer

=== Web-based XML processing engines ===

    * ["4Suite"]
    * ["maki"]

[[Anchor(TemplatingEngines)]]
== Templating Engines ==

There are many, many different HTML/XML templating libraries for Python that provide different feature sets and syntaxes. These libraries usually assume that you know how to write HTML or XML.

The number of libraries is so great because such libraries are pretty easy to write in Python; [http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52305 this recipe from the Python Cookbook] shows how easy it is.

    * [http://airspeed.pythonconsulting.com/ Airspeed] - Velocity Templates for Python
    * ["Castalian"]
    * ["Cheetah"]
    * CubicTemp
    * [http://www.djangoproject.com/documentation/templates/ Django template system]
    * [[Anchor(Elements)]][http://www.nthwave.net/elements/ Elements]
    * EmPy
    * [http://freespace.virgin.net/hamish.sanderson/htmltemplate.html HTMLTemplate]
    * [http://htmltmpl.sourceforge.net/ htmltmpl]
    * [http://wsgiarea.pocoo.org/jinja/ Jinja]
    * ["JonsPythonModules"]
    * [http://lesscode.org/projects/kid/ Kid]
    * [http://www.plope.com/software/meld3/ meld3]
    * [http://www.myghty.org/ Myghty] inspired by Perl's Mason
    * ["pso"]
    * [http://www.entrian.com/PyMeld PyMeld]
    * [[Anchor(SimpleTAL)]][http://www.owlfish.com/software/simpleTAL/ SimpleTAL]
Line 19: Line 85:
    * CherryPy
    * ["maki"]
    * ClearSilver
    * ScriptFoundryModules
    * add new entries by using the code in the WebProgrammingTemplate

Is there any interest in a WebProgrammingShootOut?

Editor: DanielDittmar
    * [http://www.pytan.com/spytee.html Spytee]
    * [http://www.stringtemplate.org stringtemplate]
    * ["teng"]
    * [http://www.execulink.com/~robin1/wasp/readme.html WASP]
    * [http://www.livinglogic.de/Python/xist/ XIST]

=== HTML Shorthand Processors ===

The libraries in this section implement simpler markup languages
that can be automatically converted to HTML. This lets you avoid having to write HTML
by hand.

    * [http://www.methods.co.nz/asciidoc/ AsciiDoc]
    * PyTextile
    * ReStructuredText
    * [http://txt2tags.sourceforge.net/ txt2tags]

=== HTML Generation class libraries ===

   * [http://starship.python.net/crew/friedrich/HTMLgen/html/main.html HTMLgen]
   * [http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/366000 HTMLTags ]
   * [http://dustman.net/andy/python/HyperText/ HyperText]
   * [http://markup.sourceforge.net/ markup ] A light-weight and flexible HTML/XML generator
   * [http://www.livinglogic.de/Python/xist/ XIST ]
   * [http://pyhtmloo.sourceforge.net/ pyhtmloo ] pyhtmloo is a library that allows python developers to use HTML code like any other python objects.

=== Static Website Generators ===

Static website generators are more then [#TemplatingEngines] in that they create ''the whole site structuire'', not just individual files. While templating is an important part of their function, determining the site structure and ''incorporating structural information'' in the output (for ex. to automatically generate navigational elements) is what really makes a static website generator a useful tool.

   * [http://www.ivy.fr/tahchee/ tahchee] - ["Cheetah"]-based static web site generator
   * [http://www.owlfish.com/software/PubTal/ PubTal] - [#SimpleTAL]-based static web site generator
   * [#Elements]
   * [http://www.voidspace.org.uk/python/rest2web/] - Generates Websites from ReST contents

=== Jython-accessible Java Templating Engines ===

   * [http://freemarker.org/index.html FreeMarker] (with Jython data binding)
   * [http://java.sun.com/products/jsp Java Server Pages, JSP]
   * [http://jakarta.apache.org/velocity/index.html Velocity]
   * [http://www.webmacro.org/ WebMacro]

=== CPython-accessible C Templating Engines ===

    * ClearSilver (HTML generation)

== Utility modules ==

    * [http://www.chrisarndt.de/en/software/python/#auth Auth modules] - a module collection for authentication purposes
    * [http://www.voidspace.org.uk/python/modules.shtml#dataenc Dataenc] - allows secure and time limited logins to be encoded into webpages for use with web applications
    * [http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/305288 HTTP basic authentication example]

= Related Links =

See also:
 * [http://www.python.org/topics/web/ The old but still useful Web Programming topic guide]
 * [http://www.python.org/sigs/web-sig/ Web SIG] (the Python Web Special Interest Group)
 * WebClientProgramming
 * DatabaseProgramming (guidance on available DatabaseInterfaces and related tools)
 * CgiScripts (information on writing CGIs in python)
 * ContentManagementSystems (Web frameworks can be used to build these)
 * [ http://qaix . com/xml-development/ XML dev-forum] [Sorry, but the editor would not let me save this page without denaturing this entry, which I did NOT place here.]

Books and articles:
 * Steve Holden wrote a book on [http://pydish.holdenweb.com/pwp/ Python Web Programming]. The book from John Goerzen, [http://www.apress.com/book/bookDisplay.html?bID=363 Foundations of Python Network Programming], can also be useful. Finally, check out the Web Programming chapter in [http://starship.python.net/crew/wesc/cpp/ Core Python Programming] by Wesley Chun.
 * [http://www.tossed.org/modules.php?name=News&file=article&sid=12 Developing With Mod_Python] - an article on Mod_Python programming with Cheetah Templates and MySQL. Contains code samples.
 * [http://pyre.third-bit.com/pyweb/index.html PyWebOff: A bakeoff of Python web application frameworks], together with a [http://pyre.third-bit.com/pywebblog/ blog] giving thoughts on writing a single application in multiple different web frameworks.
 * The [http://colorstudy.com/docs/shootout.html Web Framework Shootout] also covers several of the frameworks listed in this document.
 * The [http://benjiyork.com/quick_start Zope 3 Quick Start Guide] gives a short introduction to Zope 3.

Historical information:
 * This topic guide started out as a word by word copy of PaulBoddie's [http://www.boddie.org.uk/python/web_frameworks.html Python Web Frameworks Overview].
 * OriginalWebProgrammingClassification is an older listing of Python-related web tools, and is now out of date and only of historical interest.
 * ["PythonAndJ2EE"] (comparison of various frameworks to J2EE) is also an older document of mostly historical interest.

==== Notes on Editing ====

Opinions based on experience are welcome, but framework or templating system authors should sign their comments with InTheirOwnWords to admit to a certain bias.

The rather strict format of the main entries (described in WebProgrammingTemplateHelp) should not been seen as a limit. Feel free to add new pages containing examples, direct comparisons etc.

When adding new entries choose Web``Programming``Template when creating the page.

==== To Do ====

    * The templating systems should really get a different page layout, showing examples etc.
    * Describe PHP and Java in the same format as quite a few will want to compare to them anyway
    * Is there any interest in a WebProgrammingShootOut?

Editor: DanielDittmar (this means only that I will adapt the entries to changes in the WebProgrammingTemplate and that I will try to keep the version entries current)

== Discussion ==

For a set of comparisons of my real-world experiences with a bunch of the web solutions described on this page, check my WebSolutionComparison page. These are NOT impartial and unbiased comparisons; these are my personal experiences from building real web sites. Feel free to add your own comparisons.

-- TimRoberts

Wait- I don't understand-

Why were BaseHttpServer, DocXmlRpcServer, CgiScripts taken out?

I'd think that on a page on WebProgramming, those things would be listed.

-- LionKimbro [[DateTime(2004-08-02T14:36:38Z)]]

Other things:

 * The reorganisation is presumably to help people find the right framework - things like simple CGI-based APIs might not be cutting edge stuff, but they're potentially very useful if you don't have a "full" hosting account.
 * I didn't really agree with some aspects of the revised classifications. I think the template systems need their own page, and the multiple classifications really need banishing to another page where they'll confuse only the experts.

-- PaulBoddie

I'm afraid we need more fine-grained classification. It is unclear which of these components can be used together with others (say: is [http://www.chrisarndt.de/en/software/python/#auth Auth modules] compatible with CGI
or mod_python?

-- Michal J. Gajda

If you want web programming to be more accessible, maybe you should avoid titles like "Variable Insertion-Replacement Templating Applications"?

-- FredrikLundh

I would expect Wiki technology to be included here. Seems ironic that MoinMoin is not mentioned on this page! (Other than here ... ;)

-- StephenWaterbury.

Web Programming in Python

This topic guide links to the frameworks and templating systems available for Web programming in Python. When deciding to develop Web applications or services, you would usually choose a solution from the list below and then possibly hook it up with a templating system and other components such as database access toolkits, if the solution doesn't provide them - some such as Zope provide virtually everything you can think of!

Python-based Solutions

The listing is up-to-date as of 2005-09-24

Standardisation and Standardisation Proposals

Web Servers

Application Framework Collections

Collection of other projects that have been glued together to provided a feature rich library, without reinventing the wheel.

Application Frameworks

  • ["Albatross"] (1.33 Released 12/16/05)Albatross is a small and flexible Python toolkit for developing highly stateful web applications.
  • ["Aquarium"] (2.2.1 Released 04/21/05)offers convenient libraries, tight integration with Cheetah, adaptors for various Web environments
  • CherryPy (2.2.0 Released 01/27/06)CherryPy is a pythonic, object-oriented web development framework

  • ["Cymbeline"] (1.3.1 Released 12/09/05)application server framework, including functionality such as DB and arbitrary object pooling, web servers, persistant object repository, and a text console
  • [http://divmod.org/trac/wiki/DivmodNevow Divmod Nevow] (0.7.0 Released 12/02/05) A comprehensive library including a resource model encouraging the separation of application and presentation logic, a markup system with support for designer-friendly XHTML templates and pure-Python templates, and a robust AJAX-like API ([http://divmod.org/trac/wiki/DivmodNevow/Athena Divmod Athena]) which supports the creation of highly dynamic web pages in a structured manner.

  • ["Django"] (.91 Released 01/11/06)Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design
  • ["JOTWeb2"] (1.10 Released 12/30/05)developing dynamic web applications using HTML and TAL/TALES/METAL for templating
  • ["JonsPythonModules"] (1.06 Released 04/11/04) is a set of simple yet powerful multi-threaded object-oriented CGI/FastCGI/mod_python/html-templating modules for Python

  • ["Karrigell"] (2.2.3 Released 03/26/06) designed to be really simple to use : integrated web server and data base
  • [http://www.myghty.org/ Myghty ] (1.0 Released 01/27/06)Web application framework originally ported from HTML::Mason

  • [http://pythonpaste.org/ Python Paste ] (0.4.1 Released 02/18/06)brings consistency to Python web development and web application installation, providing tools for both developers and system administrators

  • [http://nick.borko.org/pse/index.html Python Servlet Engine] (3.0.4 Released 02/17/06)PSE parses your templates into byte compiled "servlets" to produce web pages that run fast

  • PythonWeb (0.6 Released 08/07/05)provide modules for all the common needs of web developers where components can be used together or independently

  • [http://www.mems-exchange.org/software/quixote/ Quixote] (2.4 Released 12/13/05)to develop dynamic web sites while using as much of their existing Python knowledge as possible

  • [http://snakelets.sourceforge.net/ Snakelets] (1.43 Released 12/03/05)simple-to-use Python web application server

  • [http://webpy.org/ web.py] (.137 Released 03/27/06)Think about the ideal way to write a web app. Write the code to make it happen

  • [http://www.webwareforpython.org/ Webware] (.9 Released 11/13/05)is a suite of Python packages and tools for developing object-oriented, web-based applications

  • [http://www.zope.org/ Zope] (2.9 Released 01/07/06)server for building content management systems, intranets, portals, and custom applications

Server-embedded Python

Web-based XML processing engines

  • ["4Suite"]
  • ["maki"]

Anchor(TemplatingEngines)

Templating Engines

There are many, many different HTML/XML templating libraries for Python that provide different feature sets and syntaxes. These libraries usually assume that you know how to write HTML or XML.

The number of libraries is so great because such libraries are pretty easy to write in Python; [http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52305 this recipe from the Python Cookbook] shows how easy it is.

HTML Shorthand Processors

The libraries in this section implement simpler markup languages that can be automatically converted to HTML. This lets you avoid having to write HTML by hand.

HTML Generation class libraries

Static Website Generators

Static website generators are more then [#TemplatingEngines] in that they create the whole site structuire, not just individual files. While templating is an important part of their function, determining the site structure and incorporating structural information in the output (for ex. to automatically generate navigational elements) is what really makes a static website generator a useful tool.

Jython-accessible Java Templating Engines

CPython-accessible C Templating Engines

Utility modules

Related Links

See also:

Books and articles:

Historical information:

Notes on Editing

Opinions based on experience are welcome, but framework or templating system authors should sign their comments with InTheirOwnWords to admit to a certain bias.

The rather strict format of the main entries (described in WebProgrammingTemplateHelp) should not been seen as a limit. Feel free to add new pages containing examples, direct comparisons etc.

When adding new entries choose WebProgrammingTemplate when creating the page.

To Do

  • The templating systems should really get a different page layout, showing examples etc.
  • Describe PHP and Java in the same format as quite a few will want to compare to them anyway
  • Is there any interest in a WebProgrammingShootOut?

Editor: DanielDittmar (this means only that I will adapt the entries to changes in the WebProgrammingTemplate and that I will try to keep the version entries current)

Discussion

For a set of comparisons of my real-world experiences with a bunch of the web solutions described on this page, check my WebSolutionComparison page. These are NOT impartial and unbiased comparisons; these are my personal experiences from building real web sites. Feel free to add your own comparisons.

-- TimRoberts

Wait- I don't understand-

Why were BaseHttpServer, DocXmlRpcServer, CgiScripts taken out?

I'd think that on a page on WebProgramming, those things would be listed.

-- LionKimbro DateTime(2004-08-02T14:36:38Z)

Other things:

  • The reorganisation is presumably to help people find the right framework - things like simple CGI-based APIs might not be cutting edge stuff, but they're potentially very useful if you don't have a "full" hosting account.
  • I didn't really agree with some aspects of the revised classifications. I think the template systems need their own page, and the multiple classifications really need banishing to another page where they'll confuse only the experts.

-- PaulBoddie

I'm afraid we need more fine-grained classification. It is unclear which of these components can be used together with others (say: is [http://www.chrisarndt.de/en/software/python/#auth Auth modules] compatible with CGI or mod_python?

-- Michal J. Gajda

If you want web programming to be more accessible, maybe you should avoid titles like "Variable Insertion-Replacement Templating Applications"?

-- FredrikLundh

I would expect Wiki technology to be included here. Seems ironic that MoinMoin is not mentioned on this page! (Other than here ... ;)

-- StephenWaterbury.

WebProgramming (last edited 2008-11-15 13:59:44 by localhost)

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