Skip to content

scene_pipelines.core.config

Central configuration for scene_pipelines.

Read-only and side-effect free: nothing here mutates the environment or the process.

Environment

DJ_SCHEMA_PREFIX Prefix for every schema name; empty, or ending in an underscore (e.g. dev_ → dev_scene). AUTO_ACTIVATE Opt-in eager bind. If unset/false (default), schemas stay unbound until activate_schema / SCENE_REGISTRY.activate — no DB required on import (see SCENE-Collaboration/Base-schemas#8). If truthy, make_schema and table modules that honor this setting bind immediately. SCENE_DEPLOYMENT_ID Stable id of this database, e.g. mlai-prod. Default deployment for the insertion helpers when the argument is omitted. SCENE_DEPLOYMENT_LABEL Optional human label stored on Deployment when using the env default. SCENE_LAB_ID Optional lab of this deployment, e.g. mlai. Default lab for the lookup helpers (subject_key, session_key); never for writes.

Settings dataclass

Immutable resolved settings. prefix includes the trailing underscore.

db_name

db_name(suffix: str) -> str

Full prefixed database name, e.g. 'scene' → 'dev_scene'.

load_settings

load_settings() -> Settings

Resolve settings from the environment. Pure: no mutation, no caching.

deployment_row_from_settings

deployment_row_from_settings() -> dict[str, str]

Build a deployment insert dict from SCENE_DEPLOYMENT_ID / SCENE_DEPLOYMENT_LABEL.

Raises:

Type Description
ValueError

If SCENE_DEPLOYMENT_ID is unset.

lab_key_from_settings

lab_key_from_settings() -> dict[str, str]

Build a lab key from SCENE_LAB_ID.

Raises:

Type Description
ValueError

If SCENE_LAB_ID is unset.