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.5.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.5-py3-none-any.whl (124.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_pbsmmapi-1.3.5.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.5.tar.gz
Algorithm Hash digest
SHA256 be64b0f16429a38047ac806742f84a44ed972af07d09a97c5e216cfd2e131dc2
MD5 4865f9cc46596f0b370f39cda9307926
BLAKE2b-256 769a3ae10cce56b2b6483791823a57f3f211a8b57de76ae863fe7c215304db8d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: django_pbsmmapi-1.3.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 613130ed15575c831c8f44c5fab273603c82f960c1977c122ad6ab292cc95178
MD5 45ba7f9a1d2db0212d0dca31630e5d7a
BLAKE2b-256 73ac25f6b3b26609326e3df04c6ab2101fdfb03c9f054f901bfa2ff909b7221d

See more details on using hashes here.

Provenance

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