view asyncio_threads/database/main.py @ 137:095f7dc5bfce

[MrJuneJune] Fix the js file to hit correct endpoints.
author June Park <parkjune1995@gmail.com>
date Fri, 09 Jan 2026 11:33:35 -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]