3 Early Versions

This section documents the early histroy of the Python Web Modules and the changes that took place in each version.

James's Modules
Many useful pieces of web code from various projects written by the authour gathered in a directory.

Xecos Web Modules
Much more robust structuring of code, broad range of modules coverd.

Lemon Modules
Total re-write of all code, all packaged up as lemon and hosted on sourceforge.net. The lemon modules made use of distutils to create a source zipfile.

Lemon was written from 2002 until 10th November 2003 when the final version (0.2.10) was released. Some maintence updates may be released in the future but this is unlikely.


  • Total re-write of all code
  • Complete DB interface rather than a few functions, DB-API 2.0 compatible.
  • Custom date classes written
  • Gadfly, Cheetah bundled with code.
  • Session management implementation separated from interface allowing development of storage drivers.
  • Code re-modelled in the light of the PHP way of doing things.
  • Auth management features.
  • Implementation of configuration file for default variable setting.
  • All known bugs fixed.
  • Renamed from Xecos to Lemon.
  • Propriotary code removed.
  • Simpler techniques discarded in favour of ones which Python programmers already use.
  • Attribute style access to variables removed in favour of the more compatible dict-style access.


  • Implementation of db.builder layer
  • Re-write of form generation code and fields code to be compatible with the db.builder layer.
  • Documentation started
  • Code structured properly, distutils script working correctly


  • Re-structuring of modules into interface/driver implementation
  • Module documentation generated with EPyDoc


  • Create a new auth driver which doesn't use Alter.. some databases don't support it hence avoid Gadfly Cursor Problem.
  • Rename the old alter-based db driver dbalter.py
  • Modify Gadfly Create Tables code to separate internal from normal db calls
  • Implemenation of Gadfly ALTER code to allow ALTER. Must specify a default value.
  • Completion of db.builder layer with many field options for each type.


  • Complete module restructuring
  • Basic documentation written
  • generate.py script to perform common tasks including:
    • Generate documentation.
    • Create examples and gadfly databases.
    • Precompile all modules.
    • Generate a module reference.
  • Inclusion of epydoc, docutils, reStructuredText, py2html, pyFontify
  • Re-write of tools to give a python as well as command line interface.
  • Alter SQL command
  • Full and robust support for Gadfly
  • Addition of BOOL Type to db and db.buider
  • Separation of lemon into lemon.common


  • Complete re-write of the database layer - now much more robust.
    • Types engine to convert Python->SQL and SQL->Python using cursor.description information or by maintaing a types table.
    • Autoconvert options available in the function calls for SQL statements
    • Different fetchmodes: dict, tuple, attribute/dict/tuple accessed via a functional interface
    • Debuging mode logs SQL and types information
    • mx.ODBC.windows cursor written for MS Access useage
  • Major additions to the auth module including automatic ability to send password reminders via email.
  • All modules re-written for Python 2.3 date classes
    • Features for standard date formatting.
    • Basic implementation of Python 2.3 date classes for use with Python < 2.3
  • html.form module totally re-written using a much more defined structure

Versions a,b: Important tidying up of the 0.2.6 release.


  • Re-write of the database layer again -> split it up into connection and cursor objects.. more intuitive for the Python programmer and also compatible with the thinking behind the DB 2.0 API making the db layer a possible candiate for a future release of the DB API.
  • Gadfly, ODBC and MySQL support now fully working.
  • Re-write of code to enable different formats for the conversions etc.
  • Re-write of the connect() method so that the classes stop faffing around with dictionaries.
  • Removal of dependance on the lemon.conf module from session, db and auth modules.
  • Re-write of the session module. Now uses two tables one for expiry information and one for the actual session store. It actually does clean up unwanted sessions and has a clearly defined role and interface. Also has the documentation written.


This version was the first version to be used in commercial products. It is rather unstable though so you are advised to use the latest stable version.

  • Implementation of a traceback system entirely backwards compatible with cgitb but allowing custom error handling as well.
  • Examples now all work.
  • Minor bug fixes with the dbCreateTables and dbDroptables scripts.
  • Fuller documentation in the autogenerated reference.

0.3 - 0.3.10

Rewrite the whole lot again learning from the errors of previous versions and properly integrating form and database.object.

Write file drivers for the auth and session modules and re-write the database layer