Initial project structure for Klangkiste

This commit is contained in:
2026-01-11 21:24:50 +00:00
commit 83bd89a25a
45 changed files with 695 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
"""JSON file storage placeholder for Phase 1a."""
from __future__ import annotations
import json
from pathlib import Path
from storage.storage import Storage
class JsonStorage(Storage):
def __init__(self, path: str) -> None:
self._path = Path(path)
def load_config(self) -> dict:
if not self._path.exists():
return {}
return json.loads(self._path.read_text(encoding="utf-8"))
def save_config(self, config: dict) -> None:
self._path.write_text(json.dumps(config, indent=2), encoding="utf-8")