pipekit/.archive/pre-rewrite/config.py
Paul Trowbridge 574ada5258 Initial commit: Pipekit rewrite.
Orchestration layer around the jrunner Java JDBC CLI, replacing the
previous shell-based sync system in .archive/pre-rewrite. Includes
the FastAPI + Jinja web frontend, per-driver adapters (DB2, MSSQL,
PG), wizard-driven module creation with editable dest types and
source-sourced table/column descriptions, watermark/hook CRUD,
and the engine that runs modules end-to-end.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 00:38:26 -04:00

27 lines
514 B
Python

"""Load bootstrap config from config.yaml."""
import os
from pathlib import Path
import yaml
CONFIG_PATH = os.environ.get("PIPEKIT_CONFIG", "/opt/pipekit/config.yaml")
def load_config() -> dict:
path = Path(CONFIG_PATH)
if not path.exists():
raise FileNotFoundError(f"Config not found: {path}")
with open(path) as f:
return yaml.safe_load(f)
_config = None
def get_config() -> dict:
global _config
if _config is None:
_config = load_config()
return _config