Extract config into yaml

This commit is contained in:
Ian Renton
2025-09-27 14:54:14 +01:00
parent 6d735cfc67
commit 00c56a7c10
9 changed files with 48 additions and 14 deletions

13
core/config.py Normal file
View File

@@ -0,0 +1,13 @@
import logging
import os
import yaml
# Check you have a config file
if not os.path.isfile("config.yml"):
logging.error("Your config file is missing. Ensure you have copied config-example.yml to config.yml and updated it according to your needs.")
exit()
# Load config
config = yaml.safe_load(open("config.yml"))
logging.info("Loaded config.")