RSS feed creation?

Stefan Behnel stefan_ml at behnel.de
Mon Nov 7 03:24:59 EST 2011


Stefan Behnel, 07.11.2011 08:22:
> Dan Stromberg, 06.11.2011 21:00:
>> Is there an opensource Python tool for creating RSS feeds, that doesn't
>> require large dependencies?
>>
>> I found feedformatter.py on pypi, but it seems a little old, and its sole
>> automated test gives a traceback.
>>
>> Is there a better starting point?
>>
>> (I'd of course prefer something that'll run on 3.x and 2.x, but will settle
>> for either)
>
> I'd just go with ElementTree and builder.py.
>
> http://effbot.org/zone/element-builder.htm
>
> http://effbot.python-hosting.com/file/stuff/sandbox/elementlib/builder.py

Hmm, interesting, that last link doesn't seem to work for me anymore. 
Here's a copy, however:

http://svn.effbot.org/public/stuff/sandbox/elementlib/builder.py

There's also an extended version for lxml.etree:

https://raw.github.com/lxml/lxml/master/src/lxml/builder.py

You'll quickly see if it works as expected with plain ET when you use it. 
It should in general.

> Building an RSS-API on top of that is so trivial that it's not worth any
> further dependencies anyway. Not sure if this version of builder.py runs in
> Py3, but it certainly won't be hard to fix even if it doesn't currently.

Stefan




More information about the Python-list mailing list