Recommended Python Atom feed generator? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this questionWhich Python library is commonly used today to generate Atom feeds?
Note, there exists a very similar question from 2008, but its answers are mostly obsolete. The library atomxlib was recommended, but it apparently is obsolete (also the website does not exist anymore).
For future Googlers, the recommended library (WebHelpers) doesn't support Python 3, and it appears to be abandoned. There was a rewrite, WebHelpers2, but it doesn't include the feed generator, and it seems to be end-of-lifed. "Version 2.0 is the final release."
feedgen looks more up to date, it can generate both Atom and RSS feeds, and it supports Python 3 (as well as Python 2).
It's a surprisingly non trivial question.
Looking into what known projects are using, that generates rss, my two main options are:
- python-feedgen is popular and documented, but (in 2021-05-01) don't have activity since the beginning of 2020.
- feedgenerator with recent activity and used by 2.7k projects, but with minimal documentation (or you have to extrapolate from django rss docs)
- rfeed, but have a strange PyPI publication method and (in 2021-05-01) don't have activity since the beginning of 2020.
I use webhelpers.feedgenerator. It supports Atom1 feeds.
How about rfeed?
Another one I found is the AtomFeed from Werkzeug (Atom Syndication), but the functionality is removed since the version 1.0. So I found a fork at feedwerk.
I would use one of the many templating systems out there (like Jinja2, Mako, ...)
Maybe you could reuse Django's syndication feed framework. Altough you should notice that it's usually best practice to write it by yourself because generating XML is rather simple and there's few value in using a generator as is, as mentioned by lazy1.
精彩评论