RSS/Atom Feeds¶
RSS and Atom feed generation.
Module Contents¶
RSS and Atom feed generation services.
- class AtomFeedService[source]¶
Bases:
objectService for generating Atom 1.0 feeds for events.
- NAMESPACE = 'http://www.w3.org/2005/Atom'¶
- __init__(title='Python Events', subtitle='Upcoming Python community events', author_name='Python Software Foundation', author_email='webmaster@python.org')[source]¶
- generate_feed(events, feed_id='tag:python.org,2025:events', base_url='https://www.python.org', feed_url=None)[source]¶
Generate Atom 1.0 feed XML for events.
- Parameters:
events (Sequence[Event]) – Sequence of Event objects to include in feed
feed_id (str) – Unique identifier for the feed
base_url (str) – Base URL for event links
feed_url (str | None) – URL of the feed itself (for self-reference)
- Return type:
str
- Returns:
Atom 1.0 XML string
- class RSSFeedService[source]¶
Bases:
objectService for generating RSS 2.0 feeds for events.
- VERSION = '2.0'¶
- __init__(title='Python Events', link='https://www.python.org/events/', description='Upcoming Python community events', language='en-us')[source]¶
- generate_feed(events, base_url='https://www.python.org', feed_url=None)[source]¶
Generate RSS 2.0 feed XML for events.
- Parameters:
events (Sequence[Event]) – Sequence of Event objects to include in feed
base_url (str) – Base URL for event links
feed_url (str | None) – URL of the feed itself (for self-reference)
- Return type:
str
- Returns:
RSS 2.0 XML string
Feed Service¶
Service for generating RSS/Atom feeds.
RSS 2.0 and Atom 1.0 feed generation services.
- class RSSFeedService[source]¶
Bases:
objectService for generating RSS 2.0 feeds for events.
- VERSION = '2.0'¶
- __init__(title='Python Events', link='https://www.python.org/events/', description='Upcoming Python community events', language='en-us')[source]¶
- generate_feed(events, base_url='https://www.python.org', feed_url=None)[source]¶
Generate RSS 2.0 feed XML for events.
- Parameters:
events (Sequence[Event]) – Sequence of Event objects to include in feed
base_url (str) – Base URL for event links
feed_url (str | None) – URL of the feed itself (for self-reference)
- Return type:
str
- Returns:
RSS 2.0 XML string
- class AtomFeedService[source]¶
Bases:
objectService for generating Atom 1.0 feeds for events.
- NAMESPACE = 'http://www.w3.org/2005/Atom'¶
- __init__(title='Python Events', subtitle='Upcoming Python community events', author_name='Python Software Foundation', author_email='webmaster@python.org')[source]¶
- generate_feed(events, feed_id='tag:python.org,2025:events', base_url='https://www.python.org', feed_url=None)[source]¶
Generate Atom 1.0 feed XML for events.
- Parameters:
events (Sequence[Event]) – Sequence of Event objects to include in feed
feed_id (str) – Unique identifier for the feed
base_url (str) – Base URL for event links
feed_url (str | None) – URL of the feed itself (for self-reference)
- Return type:
str
- Returns:
Atom 1.0 XML string