Initial Initial Commit

This commit is contained in:
hilfe 2024-01-23 15:58:54 +01:00
parent aa029c4c33
commit ecc9903615
6 changed files with 870 additions and 0 deletions

7
backend/__init__.py Normal file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env python3
from .database import db
import os
async def startup():
await db.signin({"user": os.getenv('DB_USER'), "pass": os.getenv('DB_PW')})
await db.use("test", "test")

7
backend/database.py Normal file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env python3
import os
from surrealdb import Surreal
db = Surreal(f"{os.getenv('DB_HOST')}:{os.getenv('DB_PORT')}")
# TODO: "SQL"-Prompts