Atom, RSS and JSON feed parser for Python 3

NicolasLM NicolasLM Last update: Mar 27, 2024

Atoma

image

image

Atom, RSS and JSON feed parser for Python 3.

Quickstart

Install Atoma with pip:

pip install atoma

Load and parse an Atom XML file:

A small change is needed if you are dealing with an RSS XML file:

Parsing feeds from the Internet is easy as well:

Features

Security warning

If you use this library to display content from feeds in a web page, you NEED to clean the HTML contained in the feeds to prevent Cross-site scripting (XSS). The bleach library is recommended for cleaning feeds.

Useful Resources

To use this library a basic understanding of feeds is required. For Atom, the Introduction to Atom is a must read. The RFC 4287 can help lift some ambiguities. Finally the feed validator is great to test hand-crafted feeds.

For RSS, the RSS specification and rssboard.org have a ton of information and examples.

For OPML, the OPML specification has a paragraph dedicated to its usage for syndication

Non-implemented Features

Some seldom used features are not implemented:

  • XML signature and encryption
  • Some Atom and RSS extensions
  • Atom content other than text, html and xhtml

License

MIT

Subscribe to our newsletter