class genrss.GenRSS(title: str, site_url: str, feed_url: str, **kwargs)

Generates RSS feed of channel.

  • title – Title of your site or feed
  • site_url – Absolute url to the site that the feed is for
  • feed_url – Absolute url to the rss feed
  • description – A short description of feed
  • image_url – Image absolute url for channel
  • author – Author of channel
  • pub_date – Datetime in utc when last item was published
  • copyright – Copyright information for this feed
  • language – The language of the content of this feed.
  • editor – Who manages content in this feed
  • webmaster – Who manages feed availability and technical support
  • generator – Feed generator
item(title: str, **kwargs)

Adds item to the feed.

An item can be used for recipes, blog entries, project update, log entry, etc. Your RSS feed can have any number of items.

  • title – Title of this particular item
  • description – Content for the item. Can contain html but link and image urls must be absolute path including hostname
  • url – Url to the item. This could be a blog entry
  • guid – A unique string feed readers use to know if an item is new or has already been seen. If you use a guid never change it. If you don’t provide a guid then your item urls must be unique
  • author – If included it is the name of the item’s creator. If not provided the item author will be the same as the feed author. This is typical except on multi-author blogs
  • categories – If provided, each array item will be added as a category element
  • enclosure – An enclosure object
  • pub_date – The date and time of when the item was created. Feed readers use this to determine the sort order. Some readers will also use it to determine if the content should be presented as unread
xml(pretty: bool = False) → str

Returns the XML as a string.

Parameters:pretty – Pretty print xml