Skip to main content

FastFeedParser

A high-performance feed parser for Python that handles RSS, Atom, and RDF. Built for speed, efficiency, and ease of use while delivering complete parsing capabilities.

Why FastFeedParser?

It's about 35x faster (check included benchmark.py) than popular feedparser library while keeping a familiar API. This speed comes from:

  • lxml for efficient XML parsing
  • Smart memory management
  • Minimal dependencies
  • Focused, streamlined code

Powers feed processing for Kagi Small Web, handling processing of thousands of feeds at scale.

Features

  • Fast parsing of RSS 2.0, Atom 1.0, and RDF/RSS 1.0 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

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

Testing https://gessfred.xyz/rss.xml
FastFeedParser: 17 entries in 0.004s
Feedparser: 17 entries in 0.098s
Speedup: 26.3x

Testing https://fanf.dreamwidth.org/data/rss
FastFeedParser: 25 entries in 0.005s
Feedparser: 25 entries in 0.087s
Speedup: 17.9x

Testing https://jacobwsmith.xyz/feed.xml
FastFeedParser: 121 entries in 0.030s
Feedparser: 121 entries in 0.166s
Speedup: 5.5x

Testing https://bernsteinbear.com/feed.xml
FastFeedParser: 11 entries in 0.007s
Feedparser: 11 entries in 0.339s
Speedup: 50.1x

And publish a full report looking like this

Summary:
--------------------------------------------------
Total wall-clock time: 40.90s
Successfully tested 200/200 feeds

FastFeedParser:
  Total entries: 6600
  Total parsing time: 0.35s
  Average per feed: 0.002s
  Feeds/sec: 571.3

Feedparser:
  Total entries: 6555
  Total parsing time: 13.19s
  Average per feed: 0.066s
  Feeds/sec: 15.2

Speedup: FastFeedParser is 37.7x 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

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 metadata
  • entries: List of feed entries

Each entry contains:

  • title: Entry title
  • link: Entry URL
  • description: Entry description/summary
  • published: Publication date
  • author: Author information
  • content: Full content
  • media_content: Media attachments
  • enclosures: Attached files

Requirements

  • Python 3.7+
  • lxml
  • python-dateutil

Optional extras:

  • brotli (pip install fastfeedparser[brotli]) for Content-Encoding: br
  • dateparser (pip install fastfeedparser[dateparser]) for the slowest date parsing fallback
  • pip install fastfeedparser[full] for both

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.2

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

Source distribution (sdist)

Source distribution for fastfeedparser 0.6.2
File Size Uploaded
fastfeedparser-0.6.2.tar.gz 37.0 kB Details

Built distribution (wheel)

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

Total release size: 64.9 kB

Release files / fastfeedparser-0.6.2.tar.gz

Download URL fastfeedparser-0.6.2.tar.gz
Size 37.0 kB
Tags Source
SHA-256 checksum
How to use checksums
06f7eb23e06f3dd23a773e0e589620c54be7d17703121f6e0f135aaedbcb20a2
BLAKE2b-256 checksum
How to use checksums
ff699c2137a316cfdca9d3721ae54bcfca8e891e90320137cb6a247b992397ef
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.2-py3-none-any.whl

Download URL fastfeedparser-0.6.2-py3-none-any.whl
Size 27.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fdf3418ca756848de4bb235d01e19e5729b79ce38fbd2ab4d78b5ee173bef66
BLAKE2b-256 checksum
How to use checksums
afe1f305af41faf0c7ee1384066ed35ff10bbb8114fa7156afd8e97d10306774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

0.6.5

9 release files

This release

0.6.2 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

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