HomeDashboard/.venv/lib/python3.12/site-packages/nicegui/persistence/persistent_dict.py

18 lines
461 B
Python
Raw Permalink Normal View History

2026-01-03 14:54:18 +01:00
import abc
from nicegui import observables
class PersistentDict(observables.ObservableDict, abc.ABC):
@abc.abstractmethod
async def initialize(self) -> None:
"""Load initial data from the persistence layer."""
@abc.abstractmethod
def initialize_sync(self) -> None:
"""Load initial data from the persistence layer in a synchronous context."""
async def close(self) -> None:
"""Clean up the persistence layer."""