Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

489 B
Raw Blame
from __future__ import annotations

from typing import Any

from marimo._save.stores import Store


class MockStore(Store):
    def __init__(self) -> None:
        super().__init__()
        self._cache: dict[str, Any] = {}

    def get(self, key: str) -> bytes | None:
        return self._cache.get(key, None)

    def put(self, key: str, value: bytes) -> bool:
        self._cache[key] = value
        return True

    def hit(self, key: str) -> bool:
        return key in self._cache