FastFeedParser
A high-performance feed parser for Python that handles RSS, Atom, RDF, and JSON Feed. Built for speed, efficiency, and ease of use while delivering complete parsing capabilities.
Why FastFeedParser?
It's about 80-100x faster (run python benchmark.py to measure yourself) than popular
feedparser library while keeping a familiar API. This speed comes from:
- Using rust bindings
- lxml for efficient XML parsing
- Smart memory management
- Minimal dependencies
- Focused, streamlined code
That figure is with the native core. Without it, parsing with lxml alone, the same benchmark comes out at about 40x.
FastFeedParser powers feed processing for Kagi Small Web, handling processing of tens of thousands of feeds at scale every day.
Features
- Fast parsing of RSS 2.0, Atom 1.0, RDF/RSS 1.0, and JSON Feed 1.0/1.1 feeds
- Robust error handling and encoding detection
- Support for media content and enclosures
- Automatic date parsing and standardization to UTC ISO 8601 format
- Clean, Pythonic API similar to feedparser
- Comprehensive handling of feed metadata
- Support for various feed extensions (Media RSS, Dublin Core, etc.)
Installation
pip install fastfeedparser
Native core
The package includes a Rust extension (fastfeedparser._core, source in
rust/) that extracts entries from well-formed UTF-8 RSS and Atom feeds.
parse() uses it automatically and falls back to lxml for everything else;
the output is the same either way.
You do not need Rust to install. Wheels for CPython 3.9+ on Linux, macOS and Windows carry the compiled extension. Anywhere else pip installs the pure-Python wheel, which parses with lxml. Installing from source builds the extension if a Rust toolchain is present and skips it if not.
Set FASTFEEDPARSER_DISABLE_CORE=1 to ignore the extension. See
rust/README.md.
Quick Start
import fastfeedparser
# Parse from URL
myfeed = fastfeedparser.parse('https://example.com/feed.xml')
# Parse from string
xml_content = '''<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>Example Feed</title>
...
</channel>
</rss>'''
myfeed = fastfeedparser.parse(xml_content)
# Access feed global information
print(myfeed.feed.title)
print(myfeed.feed.link)
# Access feed entries
for entry in myfeed.entries:
print(entry.title)
print(entry.link)
print(entry.published)
Run Benchmark
python benchmark.py
This will run benchmark on a number of feeds with output looking like this
[https://gessfred.xyz/rss.xml] FastFeedParser: 17 entries in 0.000s (median of 3 runs)
[https://gessfred.xyz/rss.xml] Feedparser: 17 entries in 0.055s (median of 3 runs)
[https://gessfred.xyz/rss.xml] Speedup: 127.3x
[https://bernsteinbear.com/feed.xml] FastFeedParser: 11 entries in 0.001s (median of 3 runs)
[https://bernsteinbear.com/feed.xml] Feedparser: 11 entries in 0.142s (median of 3 runs)
[https://bernsteinbear.com/feed.xml] Speedup: 146.3x
[https://feeds.kottke.org/main] FastFeedParser: 60 entries in 0.001s (median of 3 runs)
[https://feeds.kottke.org/main] Feedparser: 60 entries in 0.031s (median of 3 runs)
[https://feeds.kottke.org/main] Speedup: 32.3x
[https://alexwlchan.net/atom.xml] FastFeedParser: 25 entries in 0.001s (median of 3 runs)
[https://alexwlchan.net/atom.xml] Feedparser: 25 entries in 0.129s (median of 3 runs)
[https://alexwlchan.net/atom.xml] Speedup: 185.1x
And publish a full report looking like this
Summary:
--------------------------------------------------
Total wall-clock time: 36.73s
Successfully tested 200/200 feeds
FastFeedParser:
Total entries: 6600
Total parsing time: 0.13s
Average per feed: 0.001s
Feeds/sec: 1490.9
Feedparser:
Total entries: 6555
Total parsing time: 11.98s
Average per feed: 0.060s
Feeds/sec: 16.7
Speedup: FastFeedParser is 89.3x faster
OUTLIERS: Entry Count Mismatches (2 feeds)
--------------------------------------------------
https://dylanharris.org/feed-me.rss
FastFeedParser: 35 entries
Feedparser: 0 entries
Difference: +35
https://humanwhocodes.com/feeds/all.json
FastFeedParser: 10 entries
Feedparser: 0 entries
Difference: +10
Key Features
Feed Types Support
- RSS 2.0
- Atom 1.0
- RDF/RSS 1.0
- JSON Feed 1.0/1.1
Content Handling
- Automatic encoding detection
- HTML content parsing
- Media content extraction
- Enclosure handling
Metadata Support
- Feed title, link, and description
- Publication dates
- Author information
- Categories and tags
- Media content and thumbnails
API Reference
Main Functions
parse(source, *, include_content=True, include_tags=True, include_media=True, include_enclosures=True): Parse feed from a URL/XML/JSON source, with optional field extraction toggles for faster parsing.
Feed Object Structure
The parser returns a FastFeedParserDict object with two main sections:
feed: Contains feed-level metadataentries: List of feed entries
Each entry contains:
title: Entry titlelink: Entry URLdescription: Entry description/summarypublished: Publication dateauthor: Author informationcontent: Full contentmedia_content: Media attachmentsenclosures: Attached files
Requirements
- Python 3.7+
- lxml
- python-dateutil
Optional extras:
brotli(pip install fastfeedparser[brotli]) forContent-Encoding: brdateparser(pip install fastfeedparser[dateparser]) for the slowest date parsing fallbackorjson(pip install fastfeedparser[orjson]) for faster JSON Feed decodingpip install fastfeedparser[full]for all three
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Inspired by the feedparser project, FastFeedParser aims to provide a modern, high-performance alternative while maintaining a familiar API.
Metadata
Release files for fastfeedparser 0.6.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fastfeedparser-0.6.5.tar.gz | 99.0 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| fastfeedparser-0.6.5-py3-none-any.whl | Python 3 | none | any | Details |
| fastfeedparser-0.6.5-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| fastfeedparser-0.6.5-cp39-abi3-musllinux_1_2_x86_64.whl | CPython 3.9 | abi3 | Linux musl 1.2+ x86-64 | Details |
| fastfeedparser-0.6.5-cp39-abi3-musllinux_1_2_aarch64.whl | CPython 3.9 | abi3 | Linux musl 1.2+ ARM64 | Details |
| fastfeedparser-0.6.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| fastfeedparser-0.6.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| fastfeedparser-0.6.5-cp39-abi3-macosx_11_0_x86_64.whl | CPython 3.9 | abi3 | macOS 11.0+ x86-64 | Details |
| fastfeedparser-0.6.5-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 2.4 MB
Release files / fastfeedparser-0.6.5.tar.gz
| Download URL | fastfeedparser-0.6.5.tar.gz |
|---|---|
| Size | 99.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d99264b5bd28e520c8bcb3db8d40eba16f0f16760ba0ab8900199a3ed4c8bd7
|
|
BLAKE2b-256 checksum How to use checksums |
adb9032571417fa54aa99e886addf8aea404fc201b8c54901bb847c4bdaceaf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / fastfeedparser-0.6.5-py3-none-any.whl
| Download URL | fastfeedparser-0.6.5-py3-none-any.whl |
|---|---|
| Size | 37.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab08af005de4bdc6aaeaa6ed37e303bf6b398985fcf4e8065dca28b5e5646698
|
|
BLAKE2b-256 checksum How to use checksums |
45ed2787a90b977ed39c6c01e5e0703b61feeb9da903e39ec882c3c691094042
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / fastfeedparser-0.6.5-cp39-abi3-win_amd64.whl
| Download URL | fastfeedparser-0.6.5-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 212.2 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
69e2d744d9cd0a7f94d893670308addcdc48052757a1de8f60f62c8c881d990a
|
|
BLAKE2b-256 checksum How to use checksums |
757112ff4ee5e0f5c49e529c4d8cb6411e4ba4b051935e931472d43b3ec9c8b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / fastfeedparser-0.6.5-cp39-abi3-musllinux_1_2_x86_64.whl
| Download URL | fastfeedparser-0.6.5-cp39-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 395.8 kB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
2dc47d7e6f30a31aa1c0b13a8f0b4d22a78a1752eca759910d9b4e78a4d810bd
|
|
BLAKE2b-256 checksum How to use checksums |
3a02d30e951eabeabbade9d16dabbd9cf8df77f7761625c15960fd115c23cea7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / fastfeedparser-0.6.5-cp39-abi3-musllinux_1_2_aarch64.whl
| Download URL | fastfeedparser-0.6.5-cp39-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 376.5 kB |
| Tags | CPython 3.9 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
dcff9a45c64268b234c6b71343667087b8f4ab6c429810a25c95a59531ef5426
|
|
BLAKE2b-256 checksum How to use checksums |
4e1eb44f9223597060e79dd609d049ca1391daeb075e0b04e8830b9b69d344ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / fastfeedparser-0.6.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fastfeedparser-0.6.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 316.2 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
bd87a84c3db264e189a0251a01dd2bf49ef8be1edb4cc02d001336dad8d64f19
|
|
BLAKE2b-256 checksum How to use checksums |
755b491ac4e8163a96f0d7e6aed2dbaed7cf18f0d7975e034a4006a2c07eabdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / fastfeedparser-0.6.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | fastfeedparser-0.6.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 311.0 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
7dd6401d008284c0c261506bd7537403896eedeb438c1f951152bd56d30297d6
|
|
BLAKE2b-256 checksum How to use checksums |
21a2838d172b223bc3e51534bd15d20d49178c9acf2fa8e1ba8c08b9d0aeb501
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / fastfeedparser-0.6.5-cp39-abi3-macosx_11_0_x86_64.whl
| Download URL | fastfeedparser-0.6.5-cp39-abi3-macosx_11_0_x86_64.whl |
|---|---|
| Size | 310.5 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
23d73a8b3c28095ddbd870eeefe0dac0ece2a0faaf16285b1c79dd5b3b538ff2
|
|
BLAKE2b-256 checksum How to use checksums |
15b3f3d793882e431750b555331254d4d8fffac5a37e1290cf2446a3c7ecade0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / fastfeedparser-0.6.5-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | fastfeedparser-0.6.5-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 296.5 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
91e3886a3b5851e3319e8d2bdd97f4fab59058582db2815ff1e44413a58d0ddb
|
|
BLAKE2b-256 checksum How to use checksums |
baf6cc7ad5c9ac861ca6e1326dbcc571e2d4ec832005cbf21893619921321b22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|