view asyncio_threads/database/main.py @ 175:71ad34a8bc9a hg-web

[HgWeb] Can stream hg response now. Added react page for hg web since we use json anyway.
author MrJuneJune <me@mrjunejune.com>
date Tue, 20 Jan 2026 06:06:47 -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]