pod2gen

Continuous Integration (Gitlab CI) Test Coverage (Gitlab CI) Pypi version Python version Code Style: Black Documentation Status License Podcasting 2.0

Are you looking for a clean and simple library which helps you generate podcast RSS feeds with the latest podcast namespace tags from your Python code? Here is how you do that with pod2gen, a fork from PodGen implementing the https://podcastindex.org/namespace/1.0 namespace:

from pod2gen 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. pod2gen incorporates the industry’s best practices and lets you focus on collecting the necessary metadata and publishing the podcast.

pod2gen is compatible with Python 3.6+.

Contents

External Resources