Skip to main content

Django models that import content from the PBS MediaManager API

Project description

django-pbsmmapi

Code to model PBS MediaManager objects; scripts to ingest data into those models.

Introduction

This is a Django app to allow Django-based projects to work with the PBS MediaManager API. It is not expected to be a COMPLETE interface to the entirety of the PBS MediaManager; however it should allow access to all of the primary content object types.

In addition to Django, huey is used for running background ingestion tasks.

Quick start

  1. Add the pbsmmapi apps to your INSTALLED_APPS setting:
    INSTALLED_APPS = [
        ...
        'pbsmmapi',
        'pbsmmapi.episode',
        'pbsmmapi.season',
        'pbsmmapi.show',
        'pbsmmapi.special',
        'pbsmmapi.franchise',
        'pbsmmapi.changelog',
    ]
  1. You ALSO need to have PBS Media Manager credentials - an API KEY and a SECRET KEY. These also go into the settings.py file of your project:
    PBSMM_API_ID = os.environ["PBSMM_API_ID"]
    PBSMM_API_SECRET = os.environ["PBSMM_API_SECRET"]

It's not a good idea to commit these in plain text. Set them as environment variables (as suggested above) or using some other secret management tool.

  1. To ingest shows and/or franchises automatically, configure PBSMM_SHOW_SLUGS and/or PBSMM_FRANCHISE_SLUGS:
PBSMM_SHOW_SLUGS = [
    "antiques-roadshow",
]

PBSMM_FRANCHISE_SLUGS = [
    "masterpiece",
]

Huey will attempt to scrape all Show and/or Franchise data, including Specials, Seasons, Episodes, and Assets. The changelog endpoint will also be scraped.

Once a complete ingest has finished, changelog data is used to ingest updated and newly added objects.

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

django_pbsmmapi-1.3.4.tar.gz (72.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_pbsmmapi-1.3.4-py3-none-any.whl (121.9 kB view details)

Uploaded Python 3

File details

Details for the file django_pbsmmapi-1.3.4.tar.gz.

File metadata

  • Download URL: django_pbsmmapi-1.3.4.tar.gz
  • Upload date:
  • Size: 72.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_pbsmmapi-1.3.4.tar.gz
Algorithm Hash digest
SHA256 19a02869f3c470bdd42584098a191418004ae138ba2450e50f9704dda77ea1e7
MD5 ca363d07347219edf470958044a3d89f
BLAKE2b-256 5feaa16f6755b6756990ab1933d815f732b12f0b2a55ffc4181f46d1f08de1fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_pbsmmapi-1.3.4.tar.gz:

Publisher: ci.yml on WGBH/django-pbsmmapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_pbsmmapi-1.3.4-py3-none-any.whl.

File metadata

  • Download URL: django_pbsmmapi-1.3.4-py3-none-any.whl
  • Upload date:
  • Size: 121.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_pbsmmapi-1.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 28d6f626f55f04c82e56030c21cd11a3f6f345710bcfac844bd651a866899b07
MD5 b74ca97eca32a2a02a0f217dbd4b4229
BLAKE2b-256 b071a0dfb2ed6f169bf22781139548282e7efc71ca26efcb14bdb3019717f806

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_pbsmmapi-1.3.4-py3-none-any.whl:

Publisher: ci.yml on WGBH/django-pbsmmapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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