add global state
This commit is contained in:
parent
07964c469e
commit
e37aa36a3e
4 changed files with 30 additions and 20 deletions
13
backend/src/state.py
Normal file
13
backend/src/state.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
from dataclasses import dataclass
|
||||
from sqlite3 import Cursor
|
||||
|
||||
from flask import Flask
|
||||
|
||||
from .room import Room
|
||||
|
||||
|
||||
@dataclass
|
||||
class State:
|
||||
app: Flask
|
||||
db: Cursor
|
||||
rooms: dict[int, Room] = {} # { room_id: room, ... }
|
Loading…
Add table
Add a link
Reference in a new issue