PodGen — PodGen Documentation

# PodGen

Are you looking for a clean and simple library which helps you generate podcast RSS feeds from your Python code? Here is how you do that with PodGen:

    from podgen import Podcast, Episode, Media
    # Create the Podcast
    p = Podcast(
       name="Animals Alphabetically",
       description="Every Tuesday, biologist John Doe and wildlife "
                   "photographer Foo Bar introduce you to a new animal.",
       website="http://example.org/animals-alphabetically",
       explicit=False,
    )
    # Add some episodes
    p.episodes += [
       Episode(
         title="Aardvark",
         media=Media("http://example.org/files/aardvark.mp3", 11932295),
         summary="With an English name adapted directly from Afrikaans "
                 '-- literally meaning "earth pig" -- this fascinating '
                 "animal has both circular teeth and a knack for "
                 "digging.",
       ),
       Episode(
          title="Alpaca",
          media=Media("http://example.org/files/alpaca.mp3", 15363464),
          summary="Thousands of years ago, alpacas were already "
                  "domesticated and bred to produce the best fibers. "
                  "Case in point: we have found clothing made from "
                  "alpaca fiber that is 2000 years old. How is this "
                  "possible, and what makes it different from llamas?",
       ),
    ]
    # Generate the RSS feed
    rss = p.rss_str()

You don’t need to read the RSS specification, write XML by hand or wrap your head around ambiguous, undocumented APIs. PodGen incorporates the industry’s best practices and lets you focus on collecting the necessary metadata and publishing the podcast.

PodGen is compatible with Python 2.7 and 3.4+.

Warning

As of October 7th 2019 (v1.0.1), PodGen does not support the additions and changes made by Apple to their podcast standards since 2016. This includes the new and renamed categories, the ability to mark episodes with episode and season number, and the ability to mark the podcast as “serial”. It is a goal to implement those changes in a new release in 2019. Please refer to the Roadmap.

## Contents

- Background
  - Philosophy
  - Scope
  - Why the fork?
    - Inspiration
    - Summary of changes
  - Roadmap
  - License
- Usage Guide
  - Installation
  - Podcasts
    - Creating a new instance
    - Mandatory attributes
    - Image
    - Optional attributes
    - Shortcut for filling in data
  - Episodes
    - Filling with data
    - Shortcut for filling in data
  - RSS
  - Full example
- Advanced Topics
  - Using PubSubHubbub
    - Step 1: Set feed_url
    - Step 2: Decide on a hub
    - Step 3: Set pubsubhubbub
    - Step 4: Set HTTP Link Header
    - Step 5: Notify the hub of new episodes
  - Adding new tags
    - Quick How-to
    - Example: Adding a ttl element
- Contributing
  - Setting up
  - Testing
  - Values
  - The Workflow
- API Documentation

## External Resources

- Changelog

- GitHub Repository

- Python Package Index