podgen.Category

class podgen.Category(category, subcategory=None)[source]

Immutable class representing an Apple Podcasts category.

By using this class, you can be sure that the chosen category is a valid category, that it is formatted correctly and you will be warned when using an old category.

See https://help.apple.com/itc/podcasts_connect/#/itc9267a2f12 for an overview of the available categories and their subcategories.

Changed in version 1.1.0: Updated to reflect the new categories as of August 9th 2019 and yield a LegacyCategoryWarning when using one of the old categories.

Note

The categories are case-insensitive, and you may escape ampersands. The category and subcategory will end up properly capitalized and with unescaped ampersands.

Example:

>>> from podgen import Category
>>> c = Category("Music")
>>> c.category
Music
>>> c.subcategory
None
>>>
>>> d = Category("games & hobbies", "Video games")
>>> d.category
Games & Hobbies
>>> d.subcategory
Video Games
category

The category represented by this object. Read-only.

Type:str
subcategory

The subcategory this object represents. Read-only.

Type:str