Registry / serialization / feedgenerator

feedgenerator

JSON →
library2.2.1pypypi✓ verified 88d ago

Standalone version of django.utils.feedgenerator for generating RSS 2.0 and Atom feeds. Current version 2.2.1, supports Python >=3.9, released under BSD license.

pip install feedgenerator
INSTALL
IMPORT
SIG · FEEDGENERATOR
F
feedgenerator
serializationpythonv2.2.1
Install
1.5s avg
Import
122ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v2.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.126s · 17.9MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.118s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SyndicationFeed
✓ from feedgenerator import SyndicationFeed
Main class for both RSS and Atom
Rss201rev2Feed
✓ from feedgenerator import Rss201rev2Feed
✗ from feedgenerator import RSSFeed
Use Rss201rev2Feed, not non-existent RSSFeed
Atom1Feed
✓ from feedgenerator import Atom1Feed
Atom 1.0 feed class

Create RSS and Atom feeds with optional link to feed URL.

from feedgenerator import SyndicationFeed feed = SyndicationFeed( title='My Blog', link='https://example.com/', description='A blog about stuff', feed_url='https://example.com/feed.xml', author_name='Author', language='en' ) feed.add_item( title='First Post', link='https://example.com/first-post', pubdate=datetime(2026, 5, 1), description='This is my first post.' ) rss = feed.writeString('rss') atom = feed.writeString('atom') print(rss) print(atom)
Debug
Known issues
gotchaThe default writeString method may not include all items if not all feed attributes are set. Ensure feed_url is set for Atom feeds.
fix
Always set feed_url when creating an Atom feed.
affects: all
deprecatedIn older versions (<2.0), subtitles and descriptions were handled differently; since 2.0, double subtitles are fixed but description may be used as subtitle in Atom if subtitle not provided.
fix
Provide both description and subtitle explicitly to avoid confusion.
affects: >=2.0, <2.1
breakingPython 3.7 and 3.8 support dropped in version 2.2.0. Users on those Python versions must pin to feedgenerator<2.2.0.
fix
Upgrade to Python >=3.9, or pin feedgenerator to 2.1.0.
affects: >=2.2.0
Errors
Common errors & fixes
ImportError: cannot import name 'SyndicationFeed' from 'feedgenerator'
Misspelled or wrong package name; some users confuse with 'feedgen' or 'feedparser'.
fix
Use 'from feedgenerator import SyndicationFeed' after installing feedgenerator.
AttributeError: 'NoneType' object has no attribute 'strftime'
pubdate or updateddate not set or set to None when item is added.
fix
Provide a valid datetime object to pubdate parameter.
TypeError: writeString() missing 1 required positional argument: 'feedtype'
writeString expects 'rss' or 'atom' argument.
fix
Call feed.writeString('rss') or feed.writeString('atom').
Upgrade
Version history
2.2.1latest on PyPI · released Aug 17, 2025
Audit
Dependencies
pytzoptionalRequired on Windows for timezone support
Agent activity
29 hits · last 30 days
node
26
Amazon
1
OpenAI (training)
1
Resources
feedgenerator — pip install feedgenerator · libregistry