39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
import os
|
|
|
|
"""
|
|
Main Flask RESTful API
|
|
"""
|
|
|
|
__author__ = "@tormakris"
|
|
__copyright__ = "Copyright 2020, Birbnetes Team"
|
|
__module_name__ = "app"
|
|
__version__text__ = "1"
|
|
|
|
SENTRY_DSN = os.environ.get("SENTRY_DSN")
|
|
RELEASE_ID = os.environ.get("RELEASE_ID", "test")
|
|
RELEASEMODE = os.environ.get("RELEASEMODE", "dev")
|
|
|
|
DEVICE_ID = os.environ.get("DEVICE_ID", "devraspi")
|
|
|
|
TICK_INTERVAL = float(os.environ.get("TICK_INTERVAL", 0.4))
|
|
SAMPLE_LENGTH = float(os.environ.get("SAMPLE_LENGTH", 1))
|
|
|
|
ENEMY_SOUNDS = os.environ.get("ENEMY_SOUNDS", '/var/lib/birbnetes/enemy_sounds')
|
|
RECORD_DEVICE = os.environ.get("RECORD_DEVICE", 'default')
|
|
|
|
MQTT_HOSTNAME = os.getenv("GUARD_MQTT_HOSTNAME", "localhost")
|
|
MQTT_PORT = int(os.getenv("GUARD_MQTT_PORT", 1883))
|
|
MQTT_USERNAME = os.getenv("GUARD_MQTT_USERNAME", None)
|
|
MQTT_PASSWORD = os.getenv("GUARD_MQTT_PASSWORD", None)
|
|
|
|
SVM_MODEL_ID = os.environ.get("SVM_MODEL_ID")
|
|
|
|
API_URL = os.environ.get("API_URL", "http://localhost:8080")
|
|
REPORT_URL = os.environ.get("REPORT_URL", None)
|
|
REPORT_INTERVAL = float(os.environ.get("REPORT_INTERVAL", 15))
|
|
|
|
DISABLE_AI = os.environ.get("DISABLE_AI", 'no').lower() in ['yes', '1', 'true']
|
|
|
|
PLATFORM = os.environ.get("PLATFORM", "raspberry")
|