Atocha is a Python package for parsing and rendering data from web forms. It is framework-agnostic, generic, and it should be possible to use it with CGI scripts or to incorporate it in your favourite web application framework.
Just before I decided to write this software (2005-09-30), I had the following problems:
At the time, I had written my own web application framework, and a small form library I had copied from somewhere had grown into a messy monster. So I decided to attack the problem directly and rewrite my forms handling generically, with the following goals in mind:
Essentially, I wanted functionality closer to what desktop UI toolkits provide, which is often not present in web form parsing toolkits.
Ultimately, you'll have to delve into the heavily documented code to find out about all the gory details, but the simple introduction in this section will give you a taste for what the library can do for you.
Some documents:
You can try an online demo of a form with all the available widgets, that was implemented using simple CGI scripts. You can visit the source code from the demo web pages too.
Note
This simple demo does not use session management, so if many people access it at the same time you may be surprised by other people's values appearing in the results.
Snapshots of the latest atocha source code can be found in the Download area. If you make any modification to the source, please update and run the tests.
The atocha-discuss mailing-list for the project can be found at http://lists.sourceforge.net/lists/listinfo/atocha-discuss
If you find bugs, please post them on the associated SourceForge bug tracker. I share my source code in the hope that other users will provide feedback to improve stability. Contributions are also welcome.
I am actively using this library to build a commercial-grade web application and will actively improve and support the library. There is a test suite that runs through the basic features of the library.
Copyright (C) 2005 Martin Blais. This code is distributed under the GNU General Public License.
The Atocha library has evolved a lot from my original use of the form.py file in the draco framework written by Geert Jansen. I originally copied and modified the file quite a bit, and at some point I got really frustrated in my mess, being constantly in data type conversion hell and decided to rewrite the whole thing completely, with a particular emphasis on identifying and checking the types which flow throughout the life of a request.
Martin Blais <blais@furius.ca>