This is a Python wrapper for Genx, a simple C library for generating canonical XML. I use pyrex to generate the wrapper code, but the final distributable distutils source generated doesn't require pyrex.
For latest news and updates have a look at my blog. There is also a manual.
pygenx is pretty close to genx, with only the order of some of the arguments swapped to allow for defaults and keyword arguments in python. Here is the hello world sample:
#!/usr/bin/env python
import genx
import sys
#Equivalent to hello.c
writer = genx.Writer()
fp = sys.stdout
writer.startDocFile(fp)
writer.startElementLiteral("greeting")
writer.addText("Hello world!")
writer.endElement()
writer.endDocument()
And the output:
<greeting>Hello world!</greeting>
This update represents a move to setuptools and darcs. I've simplified how I keep the source (since setuptools manages most of the pain nicely now). I've also squashed another major crasher issue, and added a simple dict based addAttributes method. Finally, I've also applied a patch to pyrex which should make it's generated code play better with gcc4 (Fedora in particular).
python setup.py installThese are the released tarballs for pygenx, the version numbering is pretty simple, 0.1 maps to genx beta 1, 0.2 to beta 2 and so on. This should give me the flexibility to have sub versions (e.g. if I screw up). I'll normally release at least two source tarballs, one is the python distutils source which builds with a plain python setup.py build and the other is a snapshot of the source taken from GNU arch. The latter is the actual source, from which I generate the distutils source package.
This is a fairly big update, it adds the manual and allows use of in memory buffers (like StringIO).
python setup.py installThis update fixes a horrible oversight on my part, I never tested to see if even basic UTF-8 gets handled properly. Since python keeps good track of string encodings, without any foo.encode("UTF-8") calls it assumes that the text going into genx was ASCII which caused encoding exceptions to be thrown when UTF-8 was thrown at it. I've added tests to catch this in future.
python setup.py installThis is simply a minor update with information in the setup.py file for Pypi (the python package index).
python setup.py installThis is the first release of pygenx which I can say will actually work for most people. It's based off beta 5 of genx, and has a complete test suite and all the functions should be wrapped (or at least those tested in the test suite).
python setup.py installThe source is kept under darcs (http://www.darcs.net/). To grab it:
$ darcs get http://software.translucentcode.org/pygenx/darcs/pygenx
pygenx is licensed under the MIT License. See the LICENSE file.
Contact me via <mick nospamplease translucentcode.org> (usual feeble spam prevention tactic in my email address).