[wip] use Python 3.11 & update all dependencies
This commit is contained in:
parent
7823708383
commit
13b65103fd
4 changed files with 439 additions and 410 deletions
|
|
@ -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", "*")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue