Skip to main content

"# Kryten Playlist

Kryten playlist management service - handles video queue and playlist operations for CyTube.

Features

  • Real-time playlist management
  • Video queue operations
  • Event-driven architecture using NATS
  • Playlist synchronization
  • Catalog Management: Ingest and enrich media catalogs with LLM-powered metadata

Installation

Prerequisites

  • Python 3.10 or higher
  • Poetry
  • NATS server running
  • kryten-py library

Setup

  1. Install dependencies:
poetry install
  1. Copy the example configuration:
cp config.example.json config.json
  1. Edit config.json with your settings:
{
  "nats_url": "nats://localhost:4222",
  "nats_subject_prefix": "kryten",
  "service_name": "playlist"
}

Usage

Running the Service

Using Poetry:

poetry run kryten-playlist --config config.json

Using the startup script (PowerShell):

.\start-playlist.ps1

Using the startup script (Bash):

./start-playlist.sh

Catalog Management

Kryten Playlist includes tools to manage and enrich your media catalog.

Ingest

Ingest catalog from a MediaCMS instance:

# Using config file (recommended)
poetry run kryten-ingest --config config.json

# Or with manual arguments
poetry run kryten-ingest --base-url https://mediacms.example.com --db data/catalog.db

Enrich

Enrich metadata using LLM (OpenAI, Anthropic, OpenRouter, etc.):

# Enrich all unenriched items (recommended)
poetry run kryten-enrich --config config.json

# Manual enrichment with specific model
export LLM_API_KEY="your-key-here"
poetry run kryten-enrich --model gpt-4o --limit 100 --verify

Options:

  • --verify: Enable 2-pass verification (double-checks facts with LLM)
  • --tv-only / --movies-only: Filter by type
  • --dry-run: Preview changes without saving
  • --force-all: Re-process items even if already enriched

Command Line Options

  • --config PATH: Path to configuration file (default: /etc/kryten/playlist/config.json)
  • --log-level LEVEL: Set logging level (DEBUG, INFO, WARNING, ERROR)

Event Handling

The service currently listens for:

  • queue: Video queue events
  • delete: Video deletion events
  • moveVideo: Video position changes
  • setTemp: Temporary video status changes

Development

Running Tests

poetry run pytest

Linting

poetry run ruff check .

Formatting

poetry run black .

License

MIT License - see LICENSE file for details "

Metadata

Release files for kryten-playlist 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kryten-playlist 0.3.2
File Size Uploaded Provenance Actions
kryten_playlist-0.3.2.tar.gz 76.7 kB Without provenance Details for kryten_playlist-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kryten-playlist 0.3.2
File Interpreter ABI Platform Actions
kryten_playlist-0.3.2-py3-none-any.whl Python 3 none any Details for kryten_playlist-0.3.2-py3-none-any.whl

Total release size: 175.0 kB

Release files / kryten_playlist-0.3.2.tar.gz

Download URL kryten_playlist-0.3.2.tar.gz
Size 76.7 kB
Tags Source
SHA-256 checksum
How to use checksums
11bb92ec5149f1268a4ee91a572f85889f19125f9585b18cb60a723337cdc951
BLAKE2b-256 checksum
How to use checksums
fa39c584d488a77adb621067f8cbfefeac752758202bafc1b90c54bad012aaad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.11 Windows/11

Release files / kryten_playlist-0.3.2-py3-none-any.whl

Download URL kryten_playlist-0.3.2-py3-none-any.whl
Size 98.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2272c3c3f28aa5eff11c9e5c329a4641f79a35d602d644d67c47b4563cd57ed
BLAKE2b-256 checksum
How to use checksums
a40eb9ab70f931c0addf9d71769a50b423edea886a3dfed4d82eaee7d3b23604
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.11 Windows/11

Security for kryten-playlist 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page