Skip to main content

Buzzsprout Podcasts Python class

Project description

A Python Buzzsprout class.

Prerequisites

  • Python 3.7 and above
  • A Buzzsprout account (and your API token)

Summary

Provide an API Token and a Profile ID, to create a Buzzsprout object containing all episodes for that profile matching the given parameters.

Installation

pip install buzzsprout

Getting started

Instantiate the Buzzsprout class.

$ from buzzsprout import Buzzsprout
$ buzzsprout = Buzzsprout()

You then pass your profile id and token into the get method. By default, this will pull all episodes:

$ buzzsprout.get('profileid='PROFILEID', token='TOKEN')

Attributes

  • title
  • audio_url
  • episode_url
  • description
  • summary
  • artist
  • tags
  • published_at
  • episode_number
  • season_number

Filtering

You can currently filter by:

  • Date
  • Tag
  • Random

(and these can be used in combination).

To return only episodes newer than 2019-03-01

$ recent_episodes = buzzsprout.get(profileid='PROFILEID', token='TOKEN', datefilter='2019-03-01')

To return only episodes that contain the tag "Interviews"

$ interview_episodes = buzzsprout.get(profileid='PROFILEID', token='TOKEN', tagfilter='Interviews')

To return one random episode from the results, use the random switch

$ random_episode = buzzsprout.get(profileid='PROFILEID', token='TOKEN', random=True)

Things to note

Weirdly, Buzzsprout's API does not return an episode URL. I have therefore implemented a slightly hacky solution which modifies the audio URL. By default this URL will not use any custom URL's you have set. I have therefore implemented a workaround. If you pass in your custom URL, the episode_url property will be updated:

$ custom_url_episode = buzzsprout.get(profileid='PROFILEID', token='TOKEN', random=True, customurl='subdomain.example.com')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buzzsprout-0.22.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file buzzsprout-0.22.tar.gz.

File metadata

  • Download URL: buzzsprout-0.22.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for buzzsprout-0.22.tar.gz
Algorithm Hash digest
SHA256 f271c3317bb729260a5f236f28ae68af89c64a76d26d2f4d42aa6c42f9dd2615
MD5 817fb07a695de3c1e74b1559fa881ad4
BLAKE2b-256 98280fe07b056d179f19a53d1491146b1895fc6809e0a642ef1cfb204c84d463

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page