MemoryStorage
In-memory storage: nothing touches the disk.
On this page
Class in sponsorkit.storage.
from sponsorkit import MemoryStorageAlso importable from sponsorkit.storage.
class MemoryStorage:
...In-memory storage: nothing touches the disk. Useful for tests and ephemeral environments.
Constructor#
MemoryStorage() -> NoneMethods#
read()#
def read(self, key: str) -> str | NoneReturn the stored value.
write()#
def write(self, key: str, data: str) -> NoneReplace the stored value.
delete()#
def delete(self, key: str) -> NoneRemove the stored value.