{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/crawler\/src\/infrastructure\/config\/db_config.py"
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/crawler\/src\/infrastructure\/config\/db_config.py",
"content": "from __future__ import annotations\n\nimport os\nimport sys\nfrom dataclasses import dataclass\nfrom typing import Final\n\nPIPELINE_PATH: Final[str] = \"\/var\/www\/scripts\/pipeline\"\n\n\n@dataclass(frozen=True, slots=True)\nclass DbSettings:\n host: str\n user: str\n password: str\n database: str\n\n\ndef load_db_settings(database: str = \"crawler\") -> DbSettings:\n if PIPELINE_PATH not in sys.path:\n sys.path.insert(0, PIPELINE_PATH)\n from config import DB_CONFIG # type: ignore[import-not-found]\n\n password = DB_CONFIG.get(\"password\") or os.environ.get(\"DB_PASSWORD\", \"\")\n return DbSettings(\n host=DB_CONFIG[\"host\"],\n user=DB_CONFIG[\"user\"],\n password=password,\n database=database,\n )\n",
"numLines": 31,
"startLine": 1,
"totalLines": 31
}
}
}