view asyncio_threads/database/main.py @ 118:249881ceff7b

[PostDog] Updated some core logic. Will create a bookmark for postdog until the launch as this is annoying to deal with.
author June Park <parkjune1995@gmail.com>
date Wed, 07 Jan 2026 13:24:38 -0800
parents 46daba6e3cf4
children
line wrap: on
line source

class Database:

    def __init__(self):
        self.db = {}
        self.state = 'idle'

    def set(self, key, value):
        self.db[key] = value

    def get(self, key):
        return self.db[key]

    def unset(self, key):
        del self.db[key]