init with some kind of working prototype

This commit is contained in:
ducklet 2021-06-15 19:09:21 +02:00
commit b5cb22822e
22 changed files with 1292 additions and 0 deletions

14
unwind/config.py Normal file
View file

@ -0,0 +1,14 @@
import os
from pathlib import Path
import toml
cachedir = (
Path(cachedir) if (cachedir := os.getenv("UNWIND_CACHEDIR", ".cache")) else None
)
debug = os.getenv("DEBUG") == "1"
loglevel = os.getenv("UNWIND_LOGLEVEL") or ("DEBUG" if debug else "INFO")
storage_path = os.getenv("UNWIND_STORAGE", "./data/db.sqlite")
config_path = os.getenv("UNWIND_CONFIG", "./data/config.toml")
imdb = toml.load(config_path)["imdb"]