[wip] use Python 3.11 & update all dependencies

This commit is contained in:
ducklet 2023-02-02 00:00:24 +01:00
parent 7823708383
commit 13b65103fd
4 changed files with 439 additions and 410 deletions

View file

@ -1,8 +1,7 @@
import os
import tomllib
from pathlib import Path
import toml
datadir = Path(os.getenv("UNWIND_DATA") or "./data")
cachedir = (
Path(cachedir)
@ -14,7 +13,8 @@ loglevel = os.getenv("UNWIND_LOGLEVEL") or ("DEBUG" if debug else "INFO")
storage_path = os.getenv("UNWIND_STORAGE", datadir / "db.sqlite")
config_path = os.getenv("UNWIND_CONFIG", datadir / "config.toml")
_config = toml.load(config_path)
with open(config_path, "rb") as fd:
_config = tomllib.load(fd)
api_base = _config["api"].get("base", "/api/")
api_cors = _config["api"].get("cors", "*")