Files
mediaproc/core/schema/models/profile.py
2026-03-30 07:22:14 -03:00

31 lines
764 B
Python

"""
Profile schema — source of truth for content type profiles.
A profile has two JSONB fields:
- pipeline: graph topology (stages, edges, routing rules)
- configs: per-stage config values keyed by stage name
Validated at read time using generated contracts (StageConfigField, PipelineConfig).
"""
from dataclasses import dataclass, field
from typing import Any, Dict
from uuid import UUID
@dataclass
class Profile:
"""
A content type profile.
Defines what pipeline to run and how each stage is configured.
Seed data inserted via JSON fixtures on startup.
"""
id: UUID
name: str
pipeline: Dict[str, Any] = field(default_factory=dict)
configs: Dict[str, Any] = field(default_factory=dict)
PROFILE_VIEWS = [Profile]