mkcontrol-app/config.py
2026-02-16 21:53:09 +01:00

25 lines
836 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# config.py zentral, im Projekt-Root
import os
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-key-change-me'
# Basisverzeichnis des Projekts (absolut, robust gegen anderes CWD)
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
# Alle Pfade absolut auf Basis des Projekt-Roots
CONFIG_DIR = os.path.join(BASE_DIR, 'configs')
LOG_DIR = os.path.join(BASE_DIR, 'logs')
SOUNDS_DIR = os.path.join(BASE_DIR, 'sounds')
# Audio-Parameter (für pygame.mixer)
AUDIO_FREQ = 44100
AUDIO_SIZE = -16
AUDIO_CHANNELS = 2
AUDIO_BUFFER = 2048 # größerer Buffer reduziert Knacksen
AUDIO_NUM_CHANNELS = 16
# Optional: absolute Pfade, falls du später Docker o.ä. nutzt
# CONFIG_DIR = os.path.join(os.path.dirname(__file__), 'configs')