aircox/aircox_streamer/conf.py
Chris Tactic 55123c386d #132 | #121: backoffice / dev-1.0-121 (#131)
cfr #121

Co-authored-by: Christophe Siraut <d@tobald.eu.org>
Co-authored-by: bkfox <thomas bkfox net>
Co-authored-by: Thomas Kairos <thomas@bkfox.net>
Reviewed-on: #131
Co-authored-by: Chris Tactic <ctactic@noreply.git.radiocampus.be>
Co-committed-by: Chris Tactic <ctactic@noreply.git.radiocampus.be>
2024-04-28 22:02:09 +02:00

20 lines
483 B
Python

import os
import tempfile
from aircox.conf import BaseSettings
__all__ = ("Settings", "settings")
class Settings(BaseSettings):
WORKING_DIR = os.path.join(tempfile.gettempdir(), "aircox")
"""Parent working directory for all stations."""
def get_dir(self, station, *paths):
"""Return working directory for the provided station."""
return os.path.join(self.WORKING_DIR, station.slug.replace("-", "_"), *paths)
settings = Settings("AIRCOX_STREAMER")