Implement a persistent write-ahead log (WAL) key-value store in Python at /app/wal kv.py . The store must…
Implement a persistent write-ahead log (WAL) key-value store in Python at /app/wal kv.py . The store must…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Your script must provide a class WalKV with: - init (self, data path: str, wal path: str) — initializes paths…
The task
Your script must provide a class `WalKV` with: - `__init__(self, data_path: str, wal_path: str)` — initializes paths (does NOT create files until first operation). - `put(self, key: bytes, value: bytes)` — writes to WAL then updates in-memory state. Key and value are arbitrary bytes (may be empty, may contain nulls,…
Part of ai-and/termgrade-environments.