fix: keboola client metadata_cache_path uses DATA_DIR instead of deleted config

Fixes #7 — NameError: name 'config' is not defined
This commit is contained in:
ZdenekSrotyr 2026-03-31 11:57:57 +02:00
parent 04c5aecc58
commit 865d6d657e

View file

@ -109,7 +109,9 @@ class KeboolaClient:
# Metadata cache
self.metadata_cache: Dict[str, Dict[str, Any]] = {}
self.metadata_cache_path = config.get_metadata_path() / "table_metadata.json"
metadata_dir = Path(os.environ.get("DATA_DIR", "./data")) / "metadata"
metadata_dir.mkdir(parents=True, exist_ok=True)
self.metadata_cache_path = metadata_dir / "table_metadata.json"
# Load cache from disk if exists
self._load_metadata_cache()