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.6.tar.gz (74.1 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.6-py3-none-any.whl (124.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for django_pbsmmapi-1.3.6.tar.gz
Algorithm Hash digest
SHA256 3b407af28feebcd1beb9cf5fc65945bfc0b92e7461e3add9766f939e37220c7d
MD5 7093944201ace12014492b9d7c4ebc2c
BLAKE2b-256 9e028836c1b6ac23633dbe4d36b51eef08f17a941ad26f28165c744d0fa02454

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_pbsmmapi-1.3.6.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.6-py3-none-any.whl.

File metadata

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

File hashes

Hashes for django_pbsmmapi-1.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 67c9acbd1b597765c55639f84034c92c252d7fbd8ea4b74069105b4c00892a21
MD5 07acafcb06eb72cfd0fd2bcaa34c61a4
BLAKE2b-256 3075bdae3a7a35bfee2704016f56182a3a131854c196dcb0e88e9db0e2f3fe03

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_pbsmmapi-1.3.6-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