config_base.py 807 Bytes
# Inspired from https://whalesalad.com/blog/doing-python-configuration-right

import os

APP_NAME = "PYROS"

# Conveniences to always have a quick reference to the
# top-level application directory.
ROOT_DIR = os.path.join(
    os.path.dirname(os.path.realpath(__file__)),
    os.pardir, # '..'
)
ROOT_DIR = os.path.realpath(ROOT_DIR)

# root directories
DOC_DIR = os.path.join(ROOT_DIR, "doc")
INSTALL_DIR = os.path.join(ROOT_DIR, "install")
LOG_DIR = os.path.join(ROOT_DIR, "config", "logs")
SOURCE_DIR = os.path.join(ROOT_DIR, "src")

# source sub-directories
CELME_DIR = os.path.join(SOURCE_DIR, "core", "celme")
PYROS_DJANGO_DIR = os.path.join(SOURCE_DIR, "core", "pyros_django")
DEVICES_DIR = os.path.join(SOURCE_DIR, "device_controller")


SYSTEM_REBOOT_COMMAND = "sudo systemctl restart foo.service"