Amara XML Toolkit
[http://uche.ogbuji.net/tech/4suite/amara/ Amara XML toolkit] is an open-source collection of Python tools for XML processing, not just tools that happen to be written in Python, but tools built from the ground up to use Python idioms and take advantage of the many advantages of Python over other programming languages.
Amara builds on [http://4suite.org 4Suite], but whereas 4Suite focuses more on literal implementation of XML standards in Python, Amara adds a much more Pythonic face to these capabilities. Amara is open source, provided under the 4Suite variant of the Apache license. See the file [http://cvs.4suite.org/viewcvs/*checkout*/Amara/COPYING COPYING] for details.
For the impatient: quick install
Amara requires Python 2.4 or more recent and 4Suite-XML 1.0rc4 or more recent. It supports setuptools, so you can just do the following:
easy_install amara
If this doesn't work you're probably not set up for easy_install and I suggest you follow [http://peak.telecommunity.com/DevCenter/EasyInstall these simple instructions].
easy_install will automatically take care of installing dependencies for you. If you prefer not to use easy_install, then grab a 4Suite-XML package more recent than 1.0rc4 and install that, then install the Amara package using the usual:
python setup.py install
Or a [http://livingpyxml.python-hosting.com/wiki/InstallerForWindows Windows installer], or other method.
More details
Amara provides tools you can trust to conform with XML standards without losing the familiar Python feel. The current stable version is 1.0. The current development version is 1.1.9. The development version has many performance and API improvements, but it is not quite as field-tested as the stable version. The best-known component of Amara is the Bindery.
Amara Bindery: XML as easy as py
Bindery turns an XML document into a tree of Python objects corresponding to the vocabulary used in the XML document, for maximum clarity. For example, the document
<monty> <python spam="eggs">What do you mean "bleh"</python> <python ministry="abuse">But I was looking for argument</python> </monty>
Becomes a data structure such that you can write:
binding.monty.python.spam
In order to get the value "eggs" (as a Python Unicode object) or
binding.monty.python[1]
In order to get the element object with the contents "But I was looking for argument".
There are other such tools for Python, and what makes Bindery unique is that it's driven by a very declarative rules-based system for binding XML to the Python data. You can register rules that are triggered by XPattern expressions specialized binding behavior. It includes XPath support and is very efficient, using SAX to generate bindings. See the [http://platea.pntic.mec.es/~jmorilla/amara/manual user documentation] for more details.
Notes for users
[http://livingpyxml.python-hosting.com/wiki/AmaraWinInstallers "Amara Installers for Windows Users"]
[http://livingpyxml.python-hosting.com/wiki/AmaraWindowsInstallTips "Installing Amara on Windows"] ([http://livingpyxml.python-hosting.com/wiki/InstalandoAmaraEnWindows espaƱol: "Instalando Amara en Windows"])
[http://livingpyxml.python-hosting.com/wiki livingpyxml pages, many of which are Amara-related]
Notes for developers
[http://livingpyxml.python-hosting.com/wiki/HowToBuildAnInstaller building Windows installers]