Skip to main content
https://travis-ci.org/NicolasLM/atoma.svg?branch=master https://coveralls.io/repos/github/NicolasLM/atoma/badge.svg?branch=master

Atom, RSS and JSON feed parser for Python 3.

Quickstart

Install Atoma with pip:

pip install atoma

Load and parse an Atom XML file:

>>> import atoma
>>> feed = atoma.parse_rss_file('rss-feed.xml')
>>> feed.description
'The blog relating the daily life of web agency developers'
>>> len(feed.items)
5

Parsing feeds from the Internet is easy as well:

>>> import atoma, requests
>>> response = requests.get('http://lucumr.pocoo.org/feed.atom')
>>> feed = atoma.parse_atom_bytes(response.content)
>>> feed.title.value
"Armin Ronacher's Thoughts and Writings"

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 Copyright (c) 2018 Nicolas Le Manchet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for atoma 0.0.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for atoma 0.0.17
File Size Uploaded
atoma-0.0.17.tar.gz 10.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for atoma 0.0.17
File Interpreter ABI Platform
atoma-0.0.17-py3-none-any.whl Python 3 none any Details

Total release size: 24.0 kB

Release files / atoma-0.0.17.tar.gz

Download URL atoma-0.0.17.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
110677804e0b3dda6993fccaee44eb2929b9ee9deff3e7e434bcc3bddad6dcac
BLAKE2b-256 checksum
How to use checksums
aa15411205397765641bd88ae8bd99ba1af5fd668ec2b628077b0cb389d91d0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.1

Release files / atoma-0.0.17-py3-none-any.whl

Download URL atoma-0.0.17-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aef9c9fa2c3f7e3f721ae0502e60846853cc7f5c3cf37576336bc1fa2b314c4c
BLAKE2b-256 checksum
How to use checksums
5c2d17625a209759930d138a97648ec5821f5d1af4a68775708694251520cc83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.1

Release history Release notifications | RSS feed

This release

0.0.17 This release

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page